reworked __HOME__ to be a synonym for $c->path_to( '' )
[catagits/Catalyst-Plugin-ConfigLoader.git] / lib / Catalyst / Plugin / ConfigLoader.pm
index b75aa19..fc68afb 100644 (file)
@@ -92,7 +92,11 @@ the file inside the app's home directory.
 sub finalize_config {\r
     my $c = shift;\r
     my $v = Data::Visitor::Callback->new(\r
-        plain_value => sub { s[^__HOME__/(.+)$][ $c->path_to($1) ]e }\r
+        plain_value => sub {\r
+            return unless defined $_;\r
+            s[__HOME__][ $c->path_to( '' ) ]e;\r
+            s[__path_to\((.+)\)__][ $c->path_to( split( '/', $1 ) ) ]e;\r
+        }\r
     );\r
     $v->visit( $c->config );\r
 }\r
@@ -105,6 +109,17 @@ sub finalize_config {
 \r
 =back\r
 \r
+=head1 CONTRIBUTORS\r
+\r
+The following people have generously donated their time to the\r
+development of this module:\r
+\r
+=over 4\r
+\r
+=item * David Kamholz E<lt>dkamholz@cpan.orgE<gt>\r
+\r
+=back\r
+\r
 =head1 COPYRIGHT AND LICENSE\r
 \r
 Copyright 2006 by Brian Cassidy\r
@@ -122,4 +137,4 @@ it under the same terms as Perl itself.
 \r
 =cut\r
 \r
-1;
\ No newline at end of file
+1;\r