r23712 - in /branches/upstream/libcgi-session-serialize-yaml-perl: ./ current/ current/lib/ current/lib/CGI/ current/lib/CGI/Session/ current/lib/CGI/Session/Serialize/ current/t/

vdanjean at users.alioth.debian.org vdanjean at users.alioth.debian.org
Thu Jul 31 09:26:35 UTC 2008


Author: vdanjean
Date: Thu Jul 31 09:26:32 2008
New Revision: 23712

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=23712
Log:
[svn-inject] Installing original source of libcgi-session-serialize-yaml-perl

Added:
    branches/upstream/libcgi-session-serialize-yaml-perl/
    branches/upstream/libcgi-session-serialize-yaml-perl/current/
    branches/upstream/libcgi-session-serialize-yaml-perl/current/Build.PL
    branches/upstream/libcgi-session-serialize-yaml-perl/current/Changes
    branches/upstream/libcgi-session-serialize-yaml-perl/current/INSTALL
    branches/upstream/libcgi-session-serialize-yaml-perl/current/MANIFEST
    branches/upstream/libcgi-session-serialize-yaml-perl/current/META.yml
    branches/upstream/libcgi-session-serialize-yaml-perl/current/Makefile.PL
    branches/upstream/libcgi-session-serialize-yaml-perl/current/README
    branches/upstream/libcgi-session-serialize-yaml-perl/current/lib/
    branches/upstream/libcgi-session-serialize-yaml-perl/current/lib/CGI/
    branches/upstream/libcgi-session-serialize-yaml-perl/current/lib/CGI/Session/
    branches/upstream/libcgi-session-serialize-yaml-perl/current/lib/CGI/Session/Serialize/
    branches/upstream/libcgi-session-serialize-yaml-perl/current/lib/CGI/Session/Serialize/yaml.pm
    branches/upstream/libcgi-session-serialize-yaml-perl/current/t/
    branches/upstream/libcgi-session-serialize-yaml-perl/current/t/g4_dbfile_yaml.t
    branches/upstream/libcgi-session-serialize-yaml-perl/current/t/pod.t

Added: branches/upstream/libcgi-session-serialize-yaml-perl/current/Build.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcgi-session-serialize-yaml-perl/current/Build.PL?rev=23712&op=file
==============================================================================
--- branches/upstream/libcgi-session-serialize-yaml-perl/current/Build.PL (added)
+++ branches/upstream/libcgi-session-serialize-yaml-perl/current/Build.PL Thu Jul 31 09:26:32 2008
@@ -1,0 +1,24 @@
+use File::Spec;
+use Module::Build;
+
+# ./t/sessiondata is needed for testing.
+
+mkdir(File::Spec->catfile('t', 'sessiondata'));
+
+Module::Build -> new
+(
+	module_name    => 'CGI::Session::Serialize::yaml',
+	license        => 'artistic',
+	dist_abstract  => "Add YAML and YAML::Syck support to CGI::Session's serializers",
+	dist_author    => 'Ron Savage <ron at savage.net.au>',
+	build_requires =>
+	{
+		Test::More => 0,
+		Test::Pod  => 0,
+	},
+	requires =>
+	{
+		CGI::Session => '4.20',
+		File::Spec   => 0,
+	},
+) -> create_build_script();

Added: branches/upstream/libcgi-session-serialize-yaml-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcgi-session-serialize-yaml-perl/current/Changes?rev=23712&op=file
==============================================================================
--- branches/upstream/libcgi-session-serialize-yaml-perl/current/Changes (added)
+++ branches/upstream/libcgi-session-serialize-yaml-perl/current/Changes Thu Jul 31 09:26:32 2008
@@ -1,0 +1,10 @@
+CGI::Session::Serialize::yaml Change Log
+========================================
+
+4.21 - Thursday, March 13, 2008
+
+    * NEW: Create separate distro for this module by cutting it out of CGI::Session V 4.21.
+           The requirement is for CGI::Session V 4.20 to be pre-installed so that you can
+           install this module on top of CGI::Session without needing to upgrade to V 4.21.
+           Of course there is no point in that, since V 4.20 already includes this module's
+           code, but it allows you to reassure yourself that this distro does install ok

Added: branches/upstream/libcgi-session-serialize-yaml-perl/current/INSTALL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcgi-session-serialize-yaml-perl/current/INSTALL?rev=23712&op=file
==============================================================================
--- branches/upstream/libcgi-session-serialize-yaml-perl/current/INSTALL (added)
+++ branches/upstream/libcgi-session-serialize-yaml-perl/current/INSTALL Thu Jul 31 09:26:32 2008
@@ -1,0 +1,32 @@
+INSTALLATION
+============
+
+Using CPAN Interactive shell
+----------------------------
+
+    % perl -MCPAN -e shell
+    cpan> install CGI::Session::Serialize::yaml
+
+Using Makefile.PL
+--------------------
+
+    % perl Makefile.PL
+    % make
+    % make test
+    % make install
+
+If you don't have proper permissions to perform system-wide 
+installations you can install CGI::Session::Serialize::yaml to your private 
+PERL5LIB folder:
+
+    % perl Makefile.PL LIB=~/perllib
+    % make
+    % make test
+    % make install
+
+These commands install CGI::Session::Serialize::yaml to your ~/perllib folder.
+
+TESTING
+=======
+
+See the INSTALL document in the CGI::Session distro.

Added: branches/upstream/libcgi-session-serialize-yaml-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcgi-session-serialize-yaml-perl/current/MANIFEST?rev=23712&op=file
==============================================================================
--- branches/upstream/libcgi-session-serialize-yaml-perl/current/MANIFEST (added)
+++ branches/upstream/libcgi-session-serialize-yaml-perl/current/MANIFEST Thu Jul 31 09:26:32 2008
@@ -1,0 +1,10 @@
+Build.PL
+Changes
+INSTALL
+lib/CGI/Session/Serialize/yaml.pm
+Makefile.PL
+MANIFEST			This list of files
+README
+t/g4_dbfile_yaml.t
+t/pod.t
+META.yml

Added: branches/upstream/libcgi-session-serialize-yaml-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcgi-session-serialize-yaml-perl/current/META.yml?rev=23712&op=file
==============================================================================
--- branches/upstream/libcgi-session-serialize-yaml-perl/current/META.yml (added)
+++ branches/upstream/libcgi-session-serialize-yaml-perl/current/META.yml Thu Jul 31 09:26:32 2008
@@ -1,0 +1,23 @@
+---
+name: CGI-Session-Serialize-yaml
+version: 4.21
+author:
+  - 'Ron Savage <ron at savage.net.au>'
+abstract: Add YAML and YAML::Syck support to CGI::Session's serializers
+license: artistic
+resources:
+  license: http://opensource.org/licenses/artistic-license.php
+requires:
+  CGI::Session: 4.20
+  File::Spec: 0
+build_requires:
+  Test::More: 0
+  Test::Pod: 0
+provides:
+  CGI::Session::Serialize::yaml:
+    file: lib/CGI/Session/Serialize/yaml.pm
+    version: 4.21
+generated_by: Module::Build version 0.2808
+meta-spec:
+  url: http://module-build.sourceforge.net/META-spec-v1.2.html
+  version: 1.2

Added: branches/upstream/libcgi-session-serialize-yaml-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcgi-session-serialize-yaml-perl/current/Makefile.PL?rev=23712&op=file
==============================================================================
--- branches/upstream/libcgi-session-serialize-yaml-perl/current/Makefile.PL (added)
+++ branches/upstream/libcgi-session-serialize-yaml-perl/current/Makefile.PL Thu Jul 31 09:26:32 2008
@@ -1,0 +1,40 @@
+# $Id: Makefile.PL 336 2006-10-26 02:17:31Z markstos $
+
+use strict;
+use File::Spec;
+use lib './t/lib';
+use ExtUtils::MakeMaker;
+
+WriteMakefile(
+    NAME => 'CGI::Session::Serialize::yaml',
+    VERSION_FROM => 'lib/CGI/Session/Serialize/yaml.pm',
+    PREREQ_PM => {
+        'CGI::Session' => '4.20',
+        'File::Spec'   => undef,
+        'Test::More'   => undef,
+    },
+    ABSTRACT => 'Persistent session data in CGI applications',
+    AUTHOR => 'Sherzod Ruzmetov <sherzodr at cpan.org>',
+    clean => { FILES => [ 't/cgisess.*', 't/sessiondata' ] },
+);
+
+#
+# Creating place for test-scripts. Some of the scripts needs this to be present
+#
+mkdir(File::Spec->catfile('t', 'sessiondata'));
+
+package MY;
+use strict;
+
+sub postamble {
+    return <<'MAKE_TEXT';
+prepare_dist ::	metafile manifest dist
+	$(NOECHO) $(NOOP)
+MAKE_TEXT
+}
+
+sub libscan {
+    my ($self, $path) = @_;
+    return '' if $path =~ m/\.svn/;
+    return $path;
+}

Added: branches/upstream/libcgi-session-serialize-yaml-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcgi-session-serialize-yaml-perl/current/README?rev=23712&op=file
==============================================================================
--- branches/upstream/libcgi-session-serialize-yaml-perl/current/README (added)
+++ branches/upstream/libcgi-session-serialize-yaml-perl/current/README Thu Jul 31 09:26:32 2008
@@ -1,0 +1,57 @@
+NAME
+    CGI::Session - persistent session data in CGI applications
+
+SYNOPSIS
+        # Object initialization:
+        use CGI::Session;
+        $session = new CGI::Session();
+
+        $CGISESSID = $session->id();
+
+        # send proper HTTP header with cookies:
+        print $session->header();
+
+        # storing data in the session
+        $session->param('f_name', 'Sherzod');
+        # or
+        $session->param(-name=>'l_name', -value=>'Ruzmetov');
+
+        # retrieving data
+        my $f_name = $session->param('f_name');
+        # or
+        my $l_name = $session->param(-name=>'l_name');
+
+        # clearing a certain session parameter
+        $session->clear(["l_name", "f_name"]);
+
+        # expire '_is_logged_in' flag after 10 idle minutes:
+        $session->expire('is_logged_in', '+10m')
+
+        # expire the session itself after 1 idle hour
+        $session->expire('+1h');
+
+        # delete the session for good
+        $session->delete();
+
+DESCRIPTION
+    CGI-Session is a Perl5 library that provides an easy, reliable and modular
+    session management system across HTTP requests. Persistency is a key feature
+    for such applications as shopping carts, login/authentication routines, and
+    application that need to carry data across HTTP requests. CGI::Session does
+    that and many more.
+
+COPYRIGHT
+    Copyright (C) 2001-2005 Sherzod Ruzmetov <sherzodr at cpan.org>. All rights reserved.
+    This library is free software. You can modify and or distribute it under the same
+    terms as Perl itself.
+
+AUTHOR
+    Sherzod Ruzmetov <sherzodr at cpan.org>, http://author.handalak.com/
+
+SEE ALSO
+    *   CGI::Session::Tutorial - extended CGI::Session manual
+    *   RFC 2965 - "HTTP State Management Mechanism" found at
+        ftp://ftp.isi.edu/in-notes/rfc2965.txt
+    *   CGI - standard CGI library
+    *   Apache::Session - another fine alternative to CGI::Session
+

Added: branches/upstream/libcgi-session-serialize-yaml-perl/current/lib/CGI/Session/Serialize/yaml.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcgi-session-serialize-yaml-perl/current/lib/CGI/Session/Serialize/yaml.pm?rev=23712&op=file
==============================================================================
--- branches/upstream/libcgi-session-serialize-yaml-perl/current/lib/CGI/Session/Serialize/yaml.pm (added)
+++ branches/upstream/libcgi-session-serialize-yaml-perl/current/lib/CGI/Session/Serialize/yaml.pm Thu Jul 31 09:26:32 2008
@@ -1,0 +1,67 @@
+package CGI::Session::Serialize::yaml;
+
+use strict;
+use CGI::Session::ErrorHandler;
+
+$CGI::Session::Serialize::yaml::VERSION = '4.21';
+ at CGI::Session::Serialize::yaml::ISA     = ( "CGI::Session::ErrorHandler" );
+our $Flavour;
+
+unless($Flavour) {
+    my $package = (grep { eval("use $_ (); 1;") } qw(YAML::Syck YAML))[0]
+        or die "Either YAML::Syck or YAML are required to use ", __PACKAGE__;
+    $Flavour = $package;
+}
+
+sub freeze {
+    my ($self, $data) = @_;
+    return $Flavour->can('Dump')->($data);
+}
+
+
+sub thaw {
+    my ($self, $string) = @_;
+    return ($Flavour->can('Load')->($string))[0];
+}
+
+1;
+
+__END__;
+
+=pod
+
+=head1 NAME
+
+CGI::Session::Serialize::yaml - serializer for CGI::Session
+
+=head1 DESCRIPTION
+
+This library can be used by CGI::Session to serialize session data. It uses
+C<YAML>, or the faster C implementation, C<YAML::Syck>
+if it is available. YAML serializers exist not just for Perl but also other
+dynamic languages, such as PHP, Python, and Ruby, so storing session data
+in this format makes it easy to share session data across different languages.
+
+YAML is made to be friendly for humans to parse as well as other computer
+languages. It creates a format that is easier to read than the default
+serializer.
+
+=head1 METHODS
+
+=over 4
+
+=item freeze($class, \%hash)
+
+Receives two arguments. First is the class name, the second is the data to be serialized. Should return serialized string on success, undef on failure. Error message should be set using C<set_error()|CGI::Session::ErrorHandler/"set_error()">
+
+=item thaw($class, $string)
+
+Received two arguments. First is the class name, second is the C<YAML> data string. Should return thawed data structure on success, undef on failure. Error message should be set using C<set_error()|CGI::Session::ErrorHandler/"set_error()">
+
+=back
+
+=head1 SEE ALSO
+
+C<CGI::Session>, C<YAML>, C<YAML::Syck>.
+
+=cut

Added: branches/upstream/libcgi-session-serialize-yaml-perl/current/t/g4_dbfile_yaml.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcgi-session-serialize-yaml-perl/current/t/g4_dbfile_yaml.t?rev=23712&op=file
==============================================================================
--- branches/upstream/libcgi-session-serialize-yaml-perl/current/t/g4_dbfile_yaml.t (added)
+++ branches/upstream/libcgi-session-serialize-yaml-perl/current/t/g4_dbfile_yaml.t Thu Jul 31 09:26:32 2008
@@ -1,0 +1,50 @@
+# $Id$
+
+use strict;
+use diagnostics;
+
+use Test::More;
+use File::Spec;
+use CGI::Session::Test::Default;
+
+our %serializers;
+
+our %options = (
+    'YAML'            =>  {   },
+    'YAML::Syck'      =>  { skip    =>  [101]   },
+);
+
+plan skip_all => 'DB_File is NOT available' unless eval { require DB_File };
+
+foreach my $i (keys(%options)) {
+    $serializers{$i}++ if eval "use $i (); 1";
+}
+
+delete $serializers{YAML} if exists $serializers{YAML} && YAML->VERSION < 0.58;
+
+unless(%serializers) {
+    plan skip_all => "Neither YAML or YAML::Syck are available";
+}
+
+my @test_objects;
+
+while(my($k, $v) = each(%serializers)) {
+    push(@test_objects, CGI::Session::Test::Default->new(
+        dsn => "d:DB_File;s:YAML;id:md5",
+        args => {
+            FileName => File::Spec->catfile('t', 'sessiondata', 'cgisess.db'),
+        },
+        %{$options{$k}},
+        __testing_serializer => $k,
+    ));
+}
+
+my $tests = 0;
+$tests += $_->number_of_tests foreach @test_objects;
+plan tests => $tests;
+
+foreach my $to (@test_objects) {
+    $CGI::Session::Serialize::yaml::Flavour = $to->{__testing_serializer};
+    diag($CGI::Session::Serialize::yaml::Flavour);
+    $to->run();
+}

Added: branches/upstream/libcgi-session-serialize-yaml-perl/current/t/pod.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcgi-session-serialize-yaml-perl/current/t/pod.t?rev=23712&op=file
==============================================================================
--- branches/upstream/libcgi-session-serialize-yaml-perl/current/t/pod.t (added)
+++ branches/upstream/libcgi-session-serialize-yaml-perl/current/t/pod.t Thu Jul 31 09:26:32 2008
@@ -1,0 +1,7 @@
+use Test::More;
+
+eval "use Test::Pod 1.00";
+
+plan skip_all => "Test::Pod 1.00 required for testing POD" if $@;
+
+all_pod_files_ok();




More information about the Pkg-perl-cvs-commits mailing list