Subject: | Storable doesn't restore values |
When using Storable as the storage backend, persistent values are not
restored for a module because the module name is wrongly parsed, hence
the values are cached in './Module', but looked for in 'Module'.
The following patch fixes it for me:
@@ -35,7 +35,7 @@
sub load {
my $self = shift;
for my $file ( glob File::Spec->catfile( $self->{dir}, '*.storable'
) ) {
- my (undef, undef, $name) = map {File::Spec->splitpath($_)}
$file =~ /^(.*?)\.storable$/;
+ my ($name) = $file =~ /^(.*?)\.storable$/;
$self->{store}{$name} = retrieve($file);
}
}