[Catalyst-commits] r6953 - in trunk/Catalyst-Model-File: .
lib/Catalyst/Model t
ash at dev.catalyst.perl.org
ash at dev.catalyst.perl.org
Tue Oct 2 20:12:02 GMT 2007
Author: ash
Date: 2007-10-02 20:12:02 +0100 (Tue, 02 Oct 2007)
New Revision: 6953
Modified:
trunk/Catalyst-Model-File/MANIFEST.SKIP
trunk/Catalyst-Model-File/Makefile.PL
trunk/Catalyst-Model-File/lib/Catalyst/Model/File.pm
trunk/Catalyst-Model-File/t/06live.t
Log:
Fix typo in pod
Modified: trunk/Catalyst-Model-File/MANIFEST.SKIP
===================================================================
--- trunk/Catalyst-Model-File/MANIFEST.SKIP 2007-10-02 16:20:32 UTC (rev 6952)
+++ trunk/Catalyst-Model-File/MANIFEST.SKIP 2007-10-02 19:12:02 UTC (rev 6953)
@@ -24,7 +24,7 @@
\#$
\b\.#
^\.DS_Store$
-/\..*?\.swp$
+\..*?\.swp$
# Avoid Apache::Test files
t/conf/apache_test_config.pm
Modified: trunk/Catalyst-Model-File/Makefile.PL
===================================================================
--- trunk/Catalyst-Model-File/Makefile.PL 2007-10-02 16:20:32 UTC (rev 6952)
+++ trunk/Catalyst-Model-File/Makefile.PL 2007-10-02 19:12:02 UTC (rev 6953)
@@ -5,7 +5,7 @@
requires 'perl' => '5.8.1';
requires 'Catalyst' => '5.69';
-#requires 'Class::Data::Accessor' => '0.02';
+requires 'Catalyst::Component::InstancePerContext' => 0;
requires 'Path::Class';
build_requires 'Test::More';
Modified: trunk/Catalyst-Model-File/lib/Catalyst/Model/File.pm
===================================================================
--- trunk/Catalyst-Model-File/lib/Catalyst/Model/File.pm 2007-10-02 16:20:32 UTC (rev 6952)
+++ trunk/Catalyst-Model-File/lib/Catalyst/Model/File.pm 2007-10-02 19:12:02 UTC (rev 6953)
@@ -1,9 +1,9 @@
package Catalyst::Model::File;
-use strict;
-use warnings;
+use Moose;
+extends 'Catalyst::Model';
+with 'Catalyst::Component::InstancePerContext';
-use base qw/Catalyst::Model/;
use NEXT;
use Carp;
@@ -11,7 +11,7 @@
use Path::Class ();
use IO::File;
-our $VERSION = 0.02;
+our $VERSION = 0.06;
=head1 NAME
@@ -59,7 +59,14 @@
return $self;
}
+sub build_per_context_instance {
+ my ($self, $c) = @_;
+ $self->cd('/');
+
+ return $self;
+}
+
=head2 list
Returns a list of files (and/or directories) found under the current working
@@ -190,7 +197,7 @@
=head2 $self->file($file)
-Returns an L<Class::Path::File> object of $file (which can be a string or a Class::Path::File object,) or undef if the file is an invalid path - i.e. outside the directory structure specified in the config.
+Returns an L<Path::Class::File> object of $file (which can be a string or a Class::Path::File object,) or undef if the file is an invalid path - i.e. outside the directory structure specified in the config.
=cut
Modified: trunk/Catalyst-Model-File/t/06live.t
===================================================================
--- trunk/Catalyst-Model-File/t/06live.t 2007-10-02 16:20:32 UTC (rev 6952)
+++ trunk/Catalyst-Model-File/t/06live.t 2007-10-02 19:12:02 UTC (rev 6953)
@@ -18,7 +18,5 @@
my $res = request('http://localhost/cd');
is $res->content, '/foo';
-sleep 2;
-local $TODO = "work out how to fix this";
$res = request('http://localhost/pwd');
is $res->content, '/';
More information about the Catalyst-commits
mailing list