r12983@zaphod: kd | 2008-04-28 18:10:27 +1000
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Utils.pm
index 4e5571e..d27fa9c 100644 (file)
@@ -8,6 +8,7 @@ use Path::Class;
 use URI;
 use Class::Inspector;
 use Carp qw/croak/;
+use Cwd;
 
 =head1 NAME
 
@@ -160,6 +161,7 @@ sub home {
 
             # find the @INC entry in which $file was found
             (my $path = $inc_entry) =~ s/$file$//;
+            $path ||= cwd() if !defined $path || !length $path;
             my $home = dir($path)->absolute->cleanup;
 
             # pop off /lib and /blib if they're there
@@ -329,10 +331,9 @@ sub env_value {
     return;
 }
 
-=head1 AUTHOR
+=head1 AUTHORS
 
-Sebastian Riedel, C<sri@cpan.org>
-Yuval Kogman, C<nothingmuch@woobling.org>
+Catalyst Contributors, see Catalyst.pm
 
 =head1 COPYRIGHT