Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^2: A simple Comparison

by njh@bandsman.co.uk (Acolyte)
on Jul 24, 2015 at 14:19 UTC ( [id://1136172]=note: print w/replies, xml ) Need Help??


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 (Cardinal) 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.
    لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1136172]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (8)
As of 2024-04-18 13:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found