diff options
author | dakkar <dakkar@luxion> | 2007-09-08 10:50:54 +0000 |
---|---|---|
committer | dakkar <dakkar@luxion> | 2007-09-08 10:50:54 +0000 |
commit | 496ddccead787a78c88aef90467fb8f7d141e7c7 (patch) | |
tree | a23efef72b5e2de94915a6e8e16f2bb97b96f1e6 /lib/File/Cache/Parsed.pm | |
parent | added writers (diff) | |
download | WebCoso-496ddccead787a78c88aef90467fb8f7d141e7c7.tar.gz WebCoso-496ddccead787a78c88aef90467fb8f7d141e7c7.tar.bz2 WebCoso-496ddccead787a78c88aef90467fb8f7d141e7c7.zip |
cache is now updated on 'put'
git-svn-id: svn://luxion/repos/WebCoso/trunk@283 fcb26f47-9200-0410-b104-b98ab5b095f3
Diffstat (limited to 'lib/File/Cache/Parsed.pm')
-rw-r--r-- | lib/File/Cache/Parsed.pm | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/File/Cache/Parsed.pm b/lib/File/Cache/Parsed.pm index 7792cf1..1546ef1 100644 --- a/lib/File/Cache/Parsed.pm +++ b/lib/File/Cache/Parsed.pm @@ -76,9 +76,11 @@ sub put { my $ww=first {$filename =~ m{$_->[0]}} @{$self->{writers}}; if ($ww) { + $self->{cache}{$filename}=$contents; return $ww->[1]->($filename,$contents); } elsif (!ref($contents)) { + $self->{cache}{$filename}=$contents; return print {file($filename)->openw} $contents; } else { |