eval { require JSON::Syck; };
if( $@ ) {
require JSON;
- JSON->import;
- return jsonToObj( $content );
+ return JSON::jsonToObj( $content );
}
else {
return JSON::Syck::Load( $content );
sub load {
my $class = shift;
my $file = shift;
+ my $args = shift || {};
require XML::Simple;
- XML::Simple->import;
- my $config = XMLin(
+ my $config = XML::Simple::XMLin(
$file,
ForceArray => [ qw( component model view controller ) ],
+ %$args
);
return $class->_coerce($config);