Convert to Moose
Tomas Doran [Sun, 6 Dec 2009 16:31:26 +0000 (16:31 +0000)]
Build.PL
lib/Catalyst/Plugin/Session/State/Stash.pm

index ff2b0c7..ff3345f 100644 (file)
--- a/Build.PL
+++ b/Build.PL
@@ -8,15 +8,15 @@ my $builder = Module::Build->new(
     dist_author         => "James Laver <perl -e 'printf(qw/%s@%s.com cpan jameslaver/);'>",
     dist_version_from   => 'lib/Catalyst/Plugin/Session/State/Stash.pm',
     build_requires => {
-        'Test::More' => 0,
-        'Test::MockObject' => 0,
+        'Test::More' => '0.88',
         'Test::WWW::Mechanize::Catalyst' => 0,
         'URI::Escape' => 0,
     },
     requires => {
         'MRO::Compat' => 0,
         'Catalyst::Plugin::Session' => 0.27,
-        'Class::Accessor::Fast' => 0,
+        'Moose' => 0,
+        'namespace::autoclean' => 0,
     },
     add_to_cleanup      => [ 'Catalyst-Plugin-Session-State-Stash-*' ],
     create_makefile_pl => 'traditional',
index 0e00bdc..5983b54 100644 (file)
@@ -1,15 +1,15 @@
 package Catalyst::Plugin::Session::State::Stash;
-use base qw/Catalyst::Plugin::Session::State Class::Accessor::Fast/;
-
-#Need to look up which version of perl is required.
-#use 5.008;
-use strict;
-use warnings;
+use Moose;
+use 5.008;
 use MRO::Compat;
+use namespace::autoclean;
+
+extends 'Catalyst::Plugin::Session::State';
 
 our $VERSION = "0.12";
 
-BEGIN { __PACKAGE__->mk_accessors(qw/_deleted_session_id _prepared/) }
+has _deleted_session_id => ( is => 'rw' );
+has _prepared => ( is => 'rw' );
 
 sub _stash_key_components {
     my ($c) = @_;