1 package Config::Any::Perl;
6 use base 'Config::Any::Base';
12 Config::Any::Perl - Load Perl config files
16 Loads Perl files. Example:
20 'Controller::Foo' => {
32 return an array of valid extensions (C<pl>, C<perl>).
42 Attempts to load C<$file> as a Perl file.
51 my $mtime = (stat($file))[9];
53 if ( (not exists $cache{ $file }) || $cache{ $file }{ mtime } < $mtime ) {
60 die $exception if $exception;
62 $cache{ $file }{ mtime } = $mtime;
63 $cache{ $file }{ content } = $content;
66 return $cache{ $file }{ content };
71 Brian Cassidy E<lt>bricas@cpan.orgE<gt>
73 =head1 COPYRIGHT AND LICENSE
75 Copyright 2006-2009 by Brian Cassidy
77 This library is free software; you can redistribute it and/or modify
78 it under the same terms as Perl itself.
86 =item * L<Config::Any>