I have a program which accepts a perl data structure which is intended to be a Storable scalar. Is there a way to test if the scalar is a valid Storable object, without dying if it isn't?
For instance, if I do:
use Storable qw(freeze thaw);
my $ref = thaw("lol_not_storable")
I get back "Storable binary image v54.111 more recent than I am (v2.8) at /usr/local/lib/perl/5.12.4/Storable.pm line 420, at test.pl line 5"
I would like to figure out if it is possible to cleanly handle these exceptions without eval. Is it possible without rewriting the Storable Perl Module?