Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: "cleaning out" object data

by rev_1318 (Chaplain)
on May 20, 2005 at 08:06 UTC ( #458874=note: print w/replies, xml ) Need Help??


in reply to "cleaning out" object data

How about:
my $self = shift; %$self = ();

Paul

Replies are listed 'Best First'.
Re^2: "cleaning out" object data
by halley (Prior) on May 20, 2005 at 12:21 UTC
    This is the one you should use.

    This is also the scheme by which ImageMagick's Perl bindings module suggests you "remove all images without removing the object." Well, it's an array reference, so they document the idiom as @$magick = (), but same thing.

    --
    [ e d @ h a l l e y . c c ]

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (12)
As of 2018-09-21 13:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Eventually, "covfefe" will come to mean:













    Results (186 votes). Check out past polls.

    Notices?
    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!