pass special config options to loaders
[p5sagit/Config-Any.git] / lib / Config / Any / General.pm
index 76b04a9..975bff6 100644 (file)
@@ -40,12 +40,15 @@ Attempts to load C<$file> via Config::General.
 sub load {
     my $class = shift;
     my $file  = shift;
+    my $args  = shift || {};
 
     # work around bug (?) in Config::General
 #   return if $class->_test_perl($file);
 
+    $args->{-ConfigFile} = $file;
+
     require Config::General;
-    my $configfile = Config::General->new( $file );
+    my $configfile = Config::General->new( %$args );
     my $config     = { $configfile->getall };
     
     return $config;