X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2FConfig-Any.git;a=blobdiff_plain;f=lib%2FConfig%2FAny%2FPerl.pm;fp=lib%2FConfig%2FAny%2FPerl.pm;h=6d214f24930639aa27ead556a4484f315d1d7083;hp=daf27f6df48e4dfc9264ba3e11c3f8bce5ded4d9;hb=77bb967eff78126f81c2d60485142a6420d09c4b;hpb=49ae658349471834b403cb322f11f97258fcd0ca diff --git a/lib/Config/Any/Perl.pm b/lib/Config/Any/Perl.pm index daf27f6..6d214f2 100644 --- a/lib/Config/Any/Perl.pm +++ b/lib/Config/Any/Perl.pm @@ -5,8 +5,6 @@ use warnings; use base 'Config::Any::Base'; -my %cache; - =head1 NAME Config::Any::Perl - Load Perl config files @@ -47,23 +45,15 @@ sub load { my $class = shift; my $file = shift; my $content; - - my $mtime = (stat($file))[9]; - - if ( (not exists $cache{ $file }) || $cache{ $file }{ mtime } < $mtime ) { - my $exception; - { - local $@; - $content = do $file; - $exception = $@; - } - die $exception if $exception; - - $cache{ $file }{ mtime } = $mtime; - $cache{ $file }{ content } = $content; + my $exception; + { + local $@; + $content = do $file; + $exception = $@; } + die $exception if $exception; - return $cache{ $file }{ content }; + return $content; } =head1 AUTHOR