| Config-Merge documentation | Contained in the Config-Merge distribution. |
Config::Merge::Perl - Load Perl config files
Loads Perl files. Example:
{
name => 'TestApp',
'Controller::Foo' => {
foo => 'bar'
},
'Model::Baz' => {
qux => 'xyzzy'
}
}
Any error/warning in the file will throw a fatal error.
return an array of valid extensions (pl, perl).
Attempts to load $file as a Perl file.
Thanks to Joel Bernstein and Brian Cassidy for the original Config::Any::Perl module
None known
Clinton Gormley, <clinton@traveljury.com>
Copyright (C) 2007 by Clinton Gormley
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.7 or, at your option, any later version of Perl 5 you may have available.
| Config-Merge documentation | Contained in the Config-Merge distribution. |
package Config::Merge::Perl; use strict; use warnings FATAL => 'all', NONFATAL => 'redefine';
sub extensions {qw( pl perl );}
sub load { my $class = shift; my $file = shift; delete $INC{$file}; local ($^W) = 1; local $SIG{__WARN__} = sub { die $_[0]}; require $file; }
1;