From: Matt S Trout Date: Sat, 25 Mar 2006 20:57:52 +0000 (+0000) Subject: Got rid of Path::Class imports X-Git-Tag: 5.7099_04~660 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=a738ab683457ec903b7becf4bd384f1bf1d539c2 Got rid of Path::Class imports --- 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'); } }