in reply to Re: A simple Comparison
in thread A simple Comparison

This doesn't work if one or both of the objects is global, Storable::freeze will fail with "Can't store GLOB items".

Replies are listed 'Best First'.
Re^3: A simple Comparison
by choroba (Archbishop) on Jul 25, 2015 at 00:00 UTC
    GLOB and "global" are two different things. You can easily freeze global variables, but you can't freeze typeglobs, see "Typeglobs and Filehandles" in perldata.
    use Storable; bless our $x = [], 'My::class'; print Storable::freeze($x); # No error, $x is global. bless my $y = \*STDERR, 'My::class'; print Storable::freeze($y); # Can't store GLOB items, $y is le +xical.
    لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ