switch to module::install
Brian Cassidy [Wed, 9 Jan 2008 21:07:38 +0000 (21:07 +0000)]
Changes
Makefile.PL
lib/Catalyst/Plugin/Session.pm

diff --git a/Changes b/Changes
index e501470..9b62b98 100644 (file)
--- a/Changes
+++ b/Changes
@@ -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)
 
index ca58135..2ddf065 100644 (file)
@@ -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' );
+}
+
+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';
 
-foreach my $module (keys %state) {
-    if ( eval "require Catalyst::Plugin::Session::State::$module" and
-    ${"Catalyst::Plugin::Session::State::${module}::VERSION"} < $state{$module} ) {
-        warn <<WARN;
+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 @@ Catalyst::Plugin::Session!
 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'  => {}
-        )
-;
-
-
index ee7c7ea..08ef366 100644 (file)
@@ -13,7 +13,7 @@ use overload            ();
 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 @@ __END__
 
 =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 @@ storage and client side state required to maintain session data.
       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,25 +794,15 @@ Currently it returns a concatenated string which contains:
 
 =over 4
 
-=item *
-
-A counter
-
-=item *
+=item * A counter
 
-The current time
+=item * The current time
 
-=item *
-
-One value from C<rand>.
+=item * One value from C<rand>.
 
-=item *
+=item * The stringified value of a newly allocated hash reference
 
-The stringified value of a newly allocated hash reference
-
-=item *
-
-The stringified value of the Catalyst context object
+=item * The stringified value of the Catalyst context object
 
 =back
 
@@ -882,16 +871,16 @@ State plugins must set $c->session ID before C<prepare_action>, and during
 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 @@ plugin should be safe enough.
 
 =head1 AUTHORS
 
-=over 4
+Andy Grundman
 
-=item Andy Grundman
+Christian Hansen
 
-=item Christian Hansen
+Yuval Kogman, C<nothingmuch@woobling.org> (current maintainer)
 
-=item Yuval Kogman, C<nothingmuch@woobling.org> (current maintainer)
-
-=item Sebastian Riedel
-
-=back
+Sebastian Riedel
 
 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