[Catalyst-commits] r12866 - trunk/Config-Any/lib/Config/Any

caelum at dev.catalyst.perl.org caelum at dev.catalyst.perl.org
Mon Feb 15 13:52:28 GMT 2010


Author: caelum
Date: 2010-02-15 13:52:28 +0000 (Mon, 15 Feb 2010)
New Revision: 12866

Modified:
   trunk/Config-Any/lib/Config/Any/Perl.pm
Log:
remove caching code from ::Perl

Modified: trunk/Config-Any/lib/Config/Any/Perl.pm
===================================================================
--- trunk/Config-Any/lib/Config/Any/Perl.pm	2010-02-15 12:17:50 UTC (rev 12865)
+++ trunk/Config-Any/lib/Config/Any/Perl.pm	2010-02-15 13:52:28 UTC (rev 12866)
@@ -5,8 +5,6 @@
 
 use base 'Config::Any::Base';
 
-my %cache;
-
 =head1 NAME
 
 Config::Any::Perl - Load Perl config files
@@ -47,23 +45,15 @@
     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




More information about the Catalyst-commits mailing list