[Catalyst-commits] r7373 - in trunk/Catalyst-Plugin-Session: . lib/Catalyst/Plugin

bricas at dev.catalyst.perl.org bricas at dev.catalyst.perl.org
Wed Jan 9 21:07:39 GMT 2008


Author: bricas
Date: 2008-01-09 21:07:38 +0000 (Wed, 09 Jan 2008)
New Revision: 7373

Modified:
   trunk/Catalyst-Plugin-Session/Changes
   trunk/Catalyst-Plugin-Session/Makefile.PL
   trunk/Catalyst-Plugin-Session/lib/Catalyst/Plugin/Session.pm
Log:
switch to module::install

Modified: trunk/Catalyst-Plugin-Session/Changes
===================================================================
--- trunk/Catalyst-Plugin-Session/Changes	2008-01-09 20:11:29 UTC (rev 7372)
+++ trunk/Catalyst-Plugin-Session/Changes	2008-01-09 21:07:38 UTC (rev 7373)
@@ -1,5 +1,10 @@
 Revision history for Perl extension Catalyst::Plugin::Session
 
+0.20    XXX
+        - Switch to Module::install
+
+0.19    2007-10-08
+
 0.18    2007-08-15
         - Fix Apache engine issue (RT #28845)
 

Modified: trunk/Catalyst-Plugin-Session/Makefile.PL
===================================================================
--- trunk/Catalyst-Plugin-Session/Makefile.PL	2008-01-09 20:11:29 UTC (rev 7372)
+++ trunk/Catalyst-Plugin-Session/Makefile.PL	2008-01-09 21:07:38 UTC (rev 7373)
@@ -1,17 +1,46 @@
-use ExtUtils::MakeMaker;
+use inc::Module::Install 0.68;
 
-my %state = (
-    Cookie => 0.03,
-    URI    => 0.02,
-);
+if ( -e 'MANIFEST.SKIP' ) {
+    system( 'pod2text lib/Catalyst/Plugin/Session.pm > README' );
+}
 
-foreach my $module (keys %state) {
-    if ( eval "require Catalyst::Plugin::Session::State::$module" and
-    ${"Catalyst::Plugin::Session::State::${module}::VERSION"} < $state{$module} ) {
-        warn <<WARN;
+is_upgrading_needed();
 
+perl_version '5.008';
+
+name 'Catalyst-Plugin-Session';
+all_from 'lib/Catalyst/Plugin/Session.pm';
+
+requires 'Catalyst::Runtime' => '5.7010';
+requires 'Digest';
+requires 'File::Spec';
+requires 'File::Temp';
+requires 'Object::Signature';
+
+# an indirect dep. needs a certain version.
+requires 'Tie::Refhash' => '1.34';
+
+# for Test::Store
+requires 'Test::More';
+
+test_requires 'Test::Deep';
+test_requires 'Test::Exception';
+test_requires 'Test::MockObject' => '1.01';
+
+WriteAll;
+
+sub is_upgrading_needed {
+    my %state = (
+        Cookie => 0.03,
+        URI    => 0.02,
+    );
+
+    foreach my $module (keys %state) {
+        if ( eval "require Catalyst::Plugin::Session::State::$module" and
+        ${"Catalyst::Plugin::Session::State::${module}::VERSION"} < $state{$module} ) {
+            warn <<WARN;
+
 ********** NOTE **********
-**************************
 
 Catalyst::Plugin::Session::State::$module must also be updated!
 
@@ -21,32 +50,7 @@
 The updated versions have been added to the prerequisites.
 
 **************************
-**************************
 WARN
+        }
     }
 }
-
-WriteMakefile
-(
-          'NAME' => 'Catalyst::Plugin::Session',
-          'VERSION_FROM' => 'lib/Catalyst/Plugin/Session.pm',
-          'PREREQ_PM' => {
-                           'Catalyst' => '5.7010',
-                           'Digest' => '0',
-                           'File::Spec' => '0',
-                           'File::Temp' => '0',
-                           'Object::Signature' => '0',
-                           'Test::Deep' => '0',
-                           'Test::Exception' => '0',
-                           'Test::MockObject' => '1.01',
-                           'Test::More' => '0',
-                           'Tie::RefHash' => '1.34',
-                         },
-          'INSTALLDIRS' => 'site',
-          'EXE_FILES' => [],
-          'SIGN'      => 1,
-          'PL_FILES'  => {}
-        )
-;
-
-

Modified: trunk/Catalyst-Plugin-Session/lib/Catalyst/Plugin/Session.pm
===================================================================
--- trunk/Catalyst-Plugin-Session/lib/Catalyst/Plugin/Session.pm	2008-01-09 20:11:29 UTC (rev 7372)
+++ trunk/Catalyst-Plugin-Session/lib/Catalyst/Plugin/Session.pm	2008-01-09 21:07:38 UTC (rev 7373)
@@ -13,7 +13,7 @@
 use Object::Signature   ();
 use Carp;
 
-our $VERSION = "0.19";
+our $VERSION = '0.20';
 
 my @session_data_accessors; # used in delete_session
 BEGIN {
@@ -530,8 +530,7 @@
 
 =head1 NAME
 
-Catalyst::Plugin::Session - Generic Session plugin - ties together server side
-storage and client side state required to maintain session data.
+Catalyst::Plugin::Session - Generic Session plugin - ties together server side storage and client side state required to maintain session data.
 
 =head1 SYNOPSIS
 
@@ -543,11 +542,11 @@
       Session::State::Cookie
       /;
 
-	# you can replace Store::FastMmap with Store::File - both have sensible
-	# default configurations (see their docs for details)
+    # you can replace Store::FastMmap with Store::File - both have sensible
+    # default configurations (see their docs for details)
 
-	# more complicated backends are available for other scenarios (DBI storage,
-	# etc)
+    # more complicated backends are available for other scenarios (DBI storage,
+    # etc)
 
 
     # after you've loaded the plugins you can save session data
@@ -795,26 +794,16 @@
 
 =over 4
 
-=item *
+=item * A counter
 
-A counter
+=item * The current time
 
-=item *
+=item * One value from C<rand>.
 
-The current time
+=item * The stringified value of a newly allocated hash reference
 
-=item *
+=item * The stringified value of the Catalyst context object
 
-One value from C<rand>.
-
-=item *
-
-The stringified value of a newly allocated hash reference
-
-=item *
-
-The stringified value of the Catalyst context object
-
 =back
 
 In the hopes that those combined values are entropic enough for most uses. If
@@ -882,16 +871,16 @@
 C<prepare_action> L<Catalyst::Plugin::Session> will actually load the data from
 the store.
 
-	sub prepare_action {
-		my $c = shift;
+    sub prepare_action {
+        my $c = shift;
 
-		# don't touch $c->session yet!
+        # don't touch $c->session yet!
 
-		$c->NEXT::prepare_action( @_ );
+        $c->NEXT::prepare_action( @_ );
 
-		$c->session;  # this is OK
-		$c->sessionid; # this is also OK
-	}
+        $c->session;  # this is OK
+        $c->sessionid; # this is also OK
+    }
 
 =head1 CONFIGURATION
 
@@ -1009,25 +998,21 @@
 
 =head1 AUTHORS
 
-=over 4
+Andy Grundman
 
-=item Andy Grundman
+Christian Hansen
 
-=item Christian Hansen
+Yuval Kogman, C<nothingmuch at woobling.org> (current maintainer)
 
-=item Yuval Kogman, C<nothingmuch at woobling.org> (current maintainer)
+Sebastian Riedel
 
-=item Sebastian Riedel
-
-=back
-
 And countless other contributers from #catalyst. Thanks guys!
 
 =head1 COPYRIGHT & LICENSE
 
-	Copyright (c) 2005 the aforementioned authors. All rights
-	reserved. This program is free software; you can redistribute
-	it and/or modify it under the same terms as Perl itself.
+    Copyright (c) 2005 the aforementioned authors. All rights
+    reserved. This program is free software; you can redistribute
+    it and/or modify it under the same terms as Perl itself.
 
 =cut
 




More information about the Catalyst-commits mailing list