Config::Merge::Perl - Load Perl config files


Config-Merge documentation Contained in the Config-Merge distribution.

Index


Code Index:

NAME

Top

Config::Merge::Perl - Load Perl config files

DESCRIPTION

Top

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.

METHODS

Top

extensions( )

return an array of valid extensions (pl, perl).

load( $file )

Attempts to load $file as a Perl file.

SEE ALSO

Top

Config::Merge

THANKS

Top

Thanks to Joel Bernstein and Brian Cassidy for the original Config::Any::Perl module

BUGS

Top

None known

AUTHOR

Top

Clinton Gormley, <clinton@traveljury.com>

COPYRIGHT

Top

LICENSE

Top

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;