gregorovius has asked for the wisdom of the Perl Monks concerning the following question:
Dear fellow Monks,
I've ran into a problem with the Storable module, which looks like a bug. Whenever I do a "freeze" after a failed "thaw", Storable will balk with a "bad hash" error coming from within it.
Try the following code, which will work, and then remove the commented out bad thaw and see if it fails on your setting. I run this with the latest Storable (1.011) and Perl 5.6:
#!/usr/bin/perl -w use strict; use Storable qw(freeze thaw); my $thaw_me = 'asdasdasdasd'; #eval { # my $thawed = thaw $thaw_me; #}; #if($@) { # warn "there was a THAWING error\n"; #} my %to_be_frozen = (foo => 'bar'); my $frozen; eval { $frozen = freeze \%to_be_frozen; }; if($@) { die "error while freezing: $@" } print "it froze it\n";
Thanks in advance for any help on fixing this.
Brother Greg
|
---|
Replies are listed 'Best First'. | |
---|---|
(jeffa) Re: Storable bug?
by jeffa (Bishop) on Jun 08, 2001 at 17:37 UTC | |
Re: Storable bug?
by gregorovius (Friar) on Jun 08, 2001 at 18:57 UTC | |
by Anonymous Monk on Jun 09, 2001 at 00:48 UTC |