From: Rafael Kitover Date: Mon, 15 Feb 2010 13:52:28 +0000 (+0000) Subject: remove caching code from ::Perl X-Git-Tag: v0.19~1 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2FConfig-Any.git;a=commitdiff_plain;h=77bb967eff78126f81c2d60485142a6420d09c4b remove caching code from ::Perl --- 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