X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=lib%2FCatalyst.pm;h=508aadb5ab0c19a9d044ad60f205b6cdd71d15bc;hp=1a7e76c01d863cde64cdf7e6777cee9e59ffe8e8;hb=a738ab683457ec903b7becf4bd384f1bf1d539c2;hpb=56d8daebfb3b83c215625ae0fd3fddce455851c6 diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index 1a7e76c..508aadb 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -14,7 +14,8 @@ use Catalyst::Controller; use File::stat; use NEXT; use Text::SimpleTable; -use Path::Class; +use Path::Class::Dir; +use Path::Class::File; use Time::HiRes qw/gettimeofday tv_interval/; use URI; use Scalar::Util qw/weaken blessed/; @@ -594,9 +595,9 @@ For example: sub path_to { my ( $c, @path ) = @_; - my $path = dir( $c->config->{home}, @path ); + my $path = Path::Class::Dir->new( $c->config->{home}, @path ); if ( -d $path ) { return $path } - else { return file( $c->config->{home}, @path ) } + else { return Path::Class::File->new( $c->config->{home}, @path ) } } =head2 $c->plugin( $name, $class, @args ) @@ -1883,7 +1884,7 @@ sub setup_home { if ($home) { $class->config->{home} ||= $home; - $class->config->{root} ||= dir($home)->subdir('root'); + $class->config->{root} ||= Path::Class::Dir->new($home)->subdir('root'); } }