[Catalyst-commits] r7371 - in trunk/Catalyst-Plugin-Session-Store-File: . lib/Catalyst/Plugin/Session/Store

bricas at dev.catalyst.perl.org bricas at dev.catalyst.perl.org
Wed Jan 9 19:37:39 GMT 2008


Author: bricas
Date: 2008-01-09 19:37:39 +0000 (Wed, 09 Jan 2008)
New Revision: 7371

Added:
   trunk/Catalyst-Plugin-Session-Store-File/MANIFEST.SKIP
   trunk/Catalyst-Plugin-Session-Store-File/Makefile.PL
Removed:
   trunk/Catalyst-Plugin-Session-Store-File/Build.PL
   trunk/Catalyst-Plugin-Session-Store-File/MANIFEST
   trunk/Catalyst-Plugin-Session-Store-File/README
Modified:
   trunk/Catalyst-Plugin-Session-Store-File/Changes
   trunk/Catalyst-Plugin-Session-Store-File/lib/Catalyst/Plugin/Session/Store/File.pm
Log:
switch to Module::Install. plus: line endings, tabs, MANIFEST.SKIP

Deleted: trunk/Catalyst-Plugin-Session-Store-File/Build.PL
===================================================================
--- trunk/Catalyst-Plugin-Session-Store-File/Build.PL	2008-01-09 16:34:32 UTC (rev 7370)
+++ trunk/Catalyst-Plugin-Session-Store-File/Build.PL	2008-01-09 19:37:39 UTC (rev 7371)
@@ -1,19 +0,0 @@
-use strict;
-use Module::Build;
-
-my $build = Module::Build->new(
-    create_makefile_pl => 'traditional',
-    license            => 'perl',
-    module_name        => 'Catalyst::Plugin::Session::Store::File',
-    requires           => {
-        'Class::Data::Inheritable'  => '0.04',
-        'Class::Accessor'           => '0.22',
-        'Catalyst'                  => '5',
-        'Catalyst::Plugin::Session' => '0.01',
-        'Cache::Cache'              => '1.02',
-    },
-    reccomends    => {},
-    create_readme => 1,
-    sign          => 0,
-);
-$build->create_build_script;

Modified: trunk/Catalyst-Plugin-Session-Store-File/Changes
===================================================================
--- trunk/Catalyst-Plugin-Session-Store-File/Changes	2008-01-09 16:34:32 UTC (rev 7370)
+++ trunk/Catalyst-Plugin-Session-Store-File/Changes	2008-01-09 19:37:39 UTC (rev 7371)
@@ -1,42 +1,42 @@
-Revision history for Perl extension Catalyst::Plugin::Session::Store::File.
-
-0.12  09 Jan 2008
-      - merge 0.10 from CPAN to version in Cat repos and release
-        the result. No feature/fixes, just packaging and src sanity.
-        
-0.11  09 Jan 2008
-      - fix Class::C3 compat - karman\
-      
-0.10  07.11.2006 03:06
-    - Example added
-
-0.09  Fri Jul 21 19:37:34 2006
-    - Renamed Build.pl to Build.PL
-
-0.08  Fri Jul 21 10:30:49 2006
-    - switched to Module::Build
-
-0.07  Sun Jan  2 13:06:19 2006
-    - CPAN said: Couldn't copy file 'Catalyst-Plugin-Session-Store-File-0.06.tar.gz' to
-      '/home/ftp/incoming/Catalyst-Plugin-Session-Store-File-0.06.tar.gz':
-      Permission denied
-
-0.06  Sun Jan  1 13:11:19 2006
-    - remove expiry in store due to flexibility issues
-
-0.05  Thu Nov 23 01:36:00 2005
-	- expire_time defaults to 3600 now
-
-0.04  Thu Nov 18 20:00:00 2005
-	- more tests added
-
-0.03  Thu Nov 15 23:03:30 2005
-	- implemented "relative" option
-
-0.02  Thu Nov 15 00:03:30 2005
-	- change of dokumentation and prereq's
-
-0.01  Thu Nov  3 23:12:16 2005
-	- original version; created by h2xs 1.23 with options
-		-XA -n Catalyst::Plugin::Session::Store::File
-
+Revision history for Perl extension Catalyst::Plugin::Session::Store::File.
+
+0.12  09 Jan 2008
+    - merge 0.10 from CPAN to version in Cat repos and release
+        the result. No feature/fixes, just packaging and src sanity.
+        
+0.11  09 Jan 2008
+    - fix Class::C3 compat - karman\
+      
+0.10  07.11.2006 03:06
+    - Example added
+
+0.09  Fri Jul 21 19:37:34 2006
+    - Renamed Build.pl to Build.PL
+
+0.08  Fri Jul 21 10:30:49 2006
+    - switched to Module::Build
+
+0.07  Sun Jan  2 13:06:19 2006
+    - CPAN said: Couldn't copy file 'Catalyst-Plugin-Session-Store-File-0.06.tar.gz' to
+      '/home/ftp/incoming/Catalyst-Plugin-Session-Store-File-0.06.tar.gz':
+      Permission denied
+
+0.06  Sun Jan  1 13:11:19 2006
+    - remove expiry in store due to flexibility issues
+
+0.05  Thu Nov 23 01:36:00 2005
+    - expire_time defaults to 3600 now
+
+0.04  Thu Nov 18 20:00:00 2005
+    - more tests added
+
+0.03  Thu Nov 15 23:03:30 2005
+    - implemented "relative" option
+
+0.02  Thu Nov 15 00:03:30 2005
+    - change of dokumentation and prereq's
+
+0.01  Thu Nov  3 23:12:16 2005
+    - original version; created by h2xs 1.23 with options
+        -XA -n Catalyst::Plugin::Session::Store::File
+

Deleted: trunk/Catalyst-Plugin-Session-Store-File/MANIFEST
===================================================================
--- trunk/Catalyst-Plugin-Session-Store-File/MANIFEST	2008-01-09 16:34:32 UTC (rev 7370)
+++ trunk/Catalyst-Plugin-Session-Store-File/MANIFEST	2008-01-09 19:37:39 UTC (rev 7371)
@@ -1,9 +0,0 @@
-Changes
-Build.PL
-MANIFEST
-README
-t/01use.t
-t/02pod.t
-t/03podcoverage.t
-t/04basic.t
-lib/Catalyst/Plugin/Session/Store/File.pm

Added: trunk/Catalyst-Plugin-Session-Store-File/MANIFEST.SKIP
===================================================================
--- trunk/Catalyst-Plugin-Session-Store-File/MANIFEST.SKIP	                        (rev 0)
+++ trunk/Catalyst-Plugin-Session-Store-File/MANIFEST.SKIP	2008-01-09 19:37:39 UTC (rev 7371)
@@ -0,0 +1,29 @@
+# Avoid version control files.
+\bRCS\b
+\bCVS\b
+,v$
+\B\.svn\b
+
+# Avoid Makemaker generated and utility files.
+\bMakefile$
+\bblib
+\bMakeMaker-\d
+\bpm_to_blib$
+\bblibdirs$
+^MANIFEST\.SKIP$
+
+# Avoid Module::Build generated and utility files.
+\bBuild$
+\b_build
+
+# Avoid temp and backup files.
+~$
+\.tmp$
+\.old$
+\.bak$
+\#$
+\b\.#
+\.DS_Store$
+
+# No tarballs!
+\.gz$

Added: trunk/Catalyst-Plugin-Session-Store-File/Makefile.PL
===================================================================
--- trunk/Catalyst-Plugin-Session-Store-File/Makefile.PL	                        (rev 0)
+++ trunk/Catalyst-Plugin-Session-Store-File/Makefile.PL	2008-01-09 19:37:39 UTC (rev 7371)
@@ -0,0 +1,21 @@
+use inc::Module::Install 0.68;
+
+if ( -e 'MANIFEST.SKIP' ) {
+    system( 'pod2text lib/Catalyst/Plugin/Session/Store/File.pm > README' );
+}
+
+perl_version '5.008';
+
+name 'Catalyst-Plugin-Session-Store-File';
+all_from 'lib/Catalyst/Plugin/Session/Store/File.pm';
+
+requires 'Class::Data::Inheritable'  => '0.04';
+requires 'Class::Accessor'           => '0.22';
+requires 'Catalyst::Runtime'         => '5.7000';
+requires 'Cache::Cache'              => '1.02';
+requires 'Catalyst::Plugin::Session';
+
+test_requires 'Test::More';
+
+auto_install;
+WriteAll;

Deleted: trunk/Catalyst-Plugin-Session-Store-File/README
===================================================================
--- trunk/Catalyst-Plugin-Session-Store-File/README	2008-01-09 16:34:32 UTC (rev 7370)
+++ trunk/Catalyst-Plugin-Session-Store-File/README	2008-01-09 19:37:39 UTC (rev 7371)
@@ -1,27 +0,0 @@
-Catalyst-Plugin-Session-Store-File version 0.04
-===============================================
-
-INSTALLATION
-
-To install this module type the following:
-
-   perl Makefile.PL
-   make
-   make test
-   make install
-
-DEPENDENCIES
-
-This module requires these other modules and libraries:
-
-	Class::Data::Inheritable
-	Class::Accessor::Fast
-	Catalyst::Plugin::Session
-	Cache::Cache
-
-COPYRIGHT AND LICENCE
-
-Copyright (C) 2005 by Sascha Kiefer
-
-This program is free software, you can redistribute it and/or modify it
-under the same terms as Perl itself.

Modified: trunk/Catalyst-Plugin-Session-Store-File/lib/Catalyst/Plugin/Session/Store/File.pm
===================================================================
--- trunk/Catalyst-Plugin-Session-Store-File/lib/Catalyst/Plugin/Session/Store/File.pm	2008-01-09 16:34:32 UTC (rev 7370)
+++ trunk/Catalyst-Plugin-Session-Store-File/lib/Catalyst/Plugin/Session/Store/File.pm	2008-01-09 19:37:39 UTC (rev 7371)
@@ -1,170 +1,170 @@
-package Catalyst::Plugin::Session::Store::File;
-
-use strict;
-use base qw/
-  Class::Accessor::Fast
-  Class::Data::Inheritable
-  Catalyst::Plugin::Session::Store
-  /;
-use NEXT;
-use Cache::FileCache ();
-
-our $VERSION = '0.12';
-
-__PACKAGE__->mk_classdata(qw/_session_file_storage/);
-
-=head1 NAME
-
-Catalyst::Plugin::Session::Store::File - File storage backend for
-session data.
-
-=head1 SYNOPSIS
-
-	use Catalyst qw/Session Session::Store::File Session::State::Foo/;
-
-	MyApp->config->{session} = {
-		storage => '/tmp/session'
-	};
-
-	# ... in an action:
-	$c->session->{foo} = 'bar'; # will be saved
-
-=head1 DESCRIPTION
-
-C<Catalyst::Plugin::Session::Store::File> is an easy to use storage plugin
-for Catalyst that uses an simple file to act as a shared memory interprocess
-cache. It is based on C<Cache::FileCache>.
-
-=head2 METHODS
-
-=over 4
-
-=item get_session_data
-
-=item store_session_data
-
-=item delete_session_data
-
-=item delete_expired_sessions
-
-These are implementations of the required methods for a store. See
-L<Catalyst::Plugin::Session::Store>.
-
-=cut
-
-sub get_session_data {
-    my ( $c, $sid ) = @_;
-    $c->_session_file_storage->get($sid);
-}
-
-sub store_session_data {
-    my ( $c, $sid, $data ) = @_;
-    $c->_session_file_storage->set( $sid, $data );
-}
-
-sub delete_session_data {
-    my ( $c, $sid ) = @_;
-    $c->_session_file_storage->remove($sid);
-}
-
-sub delete_expired_sessions { }
-
-=item setup_session
-
-Sets up the session cache file.
-
-=cut
-
-sub setup_session {
-    my $c = shift;
-
-    $c->NEXT::setup_session(@_);
-
-    $c->config->{session}{namespace} ||= '';
-    my $root = $c->config->{session}{storage} ||=
-      File::Spec->catdir( Catalyst::Utils::class2tempdir($c),
-        "session", "data", );
-
-    $root = $c->path_to($root) if $c->config->{session}{relative};
-
-    Path::Class::dir($root)->mkpath;
-
-    my $cfg = $c->config->{session};
-    $c->_session_file_storage(
-        Cache::FileCache->new(
-            {
-                cache_root  => $cfg->{storage},
-                (
-                    map { $_ => $cfg->{$_} }
-                      grep { exists $cfg->{$_} }
-                      qw/namespace cache_depth directory_umask/
-                ),
-            }
-        )
-    );
-}
-
-=back
-
-=head1 CONFIGURATION
-
-These parameters are placed in the hash under the C<session> key in the
-configuration hash.
-
-=over 4
-
-=item storage
-
-Specifies the directory root to be used for the sharing of session data. The default
-value will use L<File::Spec> to find the default tempdir, and use a file named
-C<MyApp/session/data>, where C<MyApp> is replaced with the appname.
-
-Note that the file will be created with mode 0640, which means that it
-will only be writeable by processes running with the same uid as the
-process that creates the file.  If this may be a problem, for example
-if you may try to debug the program as one user and run it as another,
-specify a directory like C<< /tmp/session-$> >>, which includes the
-UID of the process in the filename.
-
-=item relative
-
-Makes the storage path relative to I<$c->path_to>
-
-=item namespace
-
-The namespace associated with this cache. Defaults to an empty string if not explicitly set.
-If set, the session data will be stored in a directory called C<MyApp/session/data/<namespace>>.
-
-=item cache_depth
-
-The number of subdirectories deep to session object item. This should be large enough that
-no session directory has more than a few hundred objects. Defaults to 3 unless explicitly set.
-
-=item directory_umask
-
-The directories in the session on the filesystem should be globally writable to allow for
-multiple users. While this is a potential security concern, the actual cache entries are
-written with the user's umask, thus reducing the risk of cache poisoning. If you desire it
-to only be user writable, set the 'directory_umask' option to '077' or similar. Defaults
-to '000' unless explicitly set.
-
-=back
-
-=head1 SEE ALSO
-
-L<Catalyst>, L<Catalyst::Plugin::Session>, L<Cache::FileCache>.
-
-=head1 AUTHOR
-
-Sascha Kiefer, L<esskar at cpan.org>
-
-=head1 COPYRIGHT AND LICENSE
-
-Copyright (C) 2005 Sascha Kiefer
-
-This library is free software; you can redistribute it and/or modify
-it under the same terms as Perl itself.
-
-=cut
-
-1;
+package Catalyst::Plugin::Session::Store::File;
+
+use strict;
+use base qw/
+  Class::Accessor::Fast
+  Class::Data::Inheritable
+  Catalyst::Plugin::Session::Store
+  /;
+use NEXT;
+use Cache::FileCache ();
+
+our $VERSION = '0.12';
+
+__PACKAGE__->mk_classdata(qw/_session_file_storage/);
+
+=head1 NAME
+
+Catalyst::Plugin::Session::Store::File - File storage backend for
+session data.
+
+=head1 SYNOPSIS
+
+    use Catalyst qw/Session Session::Store::File Session::State::Foo/;
+
+    MyApp->config->{session} = {
+        storage => '/tmp/session'
+    };
+
+    # ... in an action:
+    $c->session->{foo} = 'bar'; # will be saved
+
+=head1 DESCRIPTION
+
+C<Catalyst::Plugin::Session::Store::File> is an easy to use storage plugin
+for Catalyst that uses an simple file to act as a shared memory interprocess
+cache. It is based on C<Cache::FileCache>.
+
+=head2 METHODS
+
+=over 4
+
+=item get_session_data
+
+=item store_session_data
+
+=item delete_session_data
+
+=item delete_expired_sessions
+
+These are implementations of the required methods for a store. See
+L<Catalyst::Plugin::Session::Store>.
+
+=cut
+
+sub get_session_data {
+    my ( $c, $sid ) = @_;
+    $c->_session_file_storage->get($sid);
+}
+
+sub store_session_data {
+    my ( $c, $sid, $data ) = @_;
+    $c->_session_file_storage->set( $sid, $data );
+}
+
+sub delete_session_data {
+    my ( $c, $sid ) = @_;
+    $c->_session_file_storage->remove($sid);
+}
+
+sub delete_expired_sessions { }
+
+=item setup_session
+
+Sets up the session cache file.
+
+=cut
+
+sub setup_session {
+    my $c = shift;
+
+    $c->NEXT::setup_session(@_);
+
+    $c->config->{session}{namespace} ||= '';
+    my $root = $c->config->{session}{storage} ||=
+      File::Spec->catdir( Catalyst::Utils::class2tempdir($c),
+        "session", "data", );
+
+    $root = $c->path_to($root) if $c->config->{session}{relative};
+
+    Path::Class::dir($root)->mkpath;
+
+    my $cfg = $c->config->{session};
+    $c->_session_file_storage(
+        Cache::FileCache->new(
+            {
+                cache_root  => $cfg->{storage},
+                (
+                    map { $_ => $cfg->{$_} }
+                      grep { exists $cfg->{$_} }
+                      qw/namespace cache_depth directory_umask/
+                ),
+            }
+        )
+    );
+}
+
+=back
+
+=head1 CONFIGURATION
+
+These parameters are placed in the hash under the C<session> key in the
+configuration hash.
+
+=over 4
+
+=item storage
+
+Specifies the directory root to be used for the sharing of session data. The default
+value will use L<File::Spec> to find the default tempdir, and use a file named
+C<MyApp/session/data>, where C<MyApp> is replaced with the appname.
+
+Note that the file will be created with mode 0640, which means that it
+will only be writeable by processes running with the same uid as the
+process that creates the file.  If this may be a problem, for example
+if you may try to debug the program as one user and run it as another,
+specify a directory like C<< /tmp/session-$> >>, which includes the
+UID of the process in the filename.
+
+=item relative
+
+Makes the storage path relative to I<$c->path_to>
+
+=item namespace
+
+The namespace associated with this cache. Defaults to an empty string if not explicitly set.
+If set, the session data will be stored in a directory called C<MyApp/session/data/<namespace>>.
+
+=item cache_depth
+
+The number of subdirectories deep to session object item. This should be large enough that
+no session directory has more than a few hundred objects. Defaults to 3 unless explicitly set.
+
+=item directory_umask
+
+The directories in the session on the filesystem should be globally writable to allow for
+multiple users. While this is a potential security concern, the actual cache entries are
+written with the user's umask, thus reducing the risk of cache poisoning. If you desire it
+to only be user writable, set the 'directory_umask' option to '077' or similar. Defaults
+to '000' unless explicitly set.
+
+=back
+
+=head1 SEE ALSO
+
+L<Catalyst>, L<Catalyst::Plugin::Session>, L<Cache::FileCache>.
+
+=head1 AUTHOR
+
+Sascha Kiefer, L<esskar at cpan.org>
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright (C) 2005 Sascha Kiefer
+
+This library is free software; you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
+
+1;




More information about the Catalyst-commits mailing list