Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: What's the weaken here for?

by Anonymous Monk
on Jan 20, 2012 at 02:29 UTC ( [id://948869]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $ perl -MDevel::Peek -MScalar::Util=weaken -le " sub fudge { my $f = s
    +ub { print 1; }; Dump($f); weaken $f; Dump($f); $f; } $f = fudge(); $
    +f->(); Dump($f);"
    SV = IV(0x3f8d18) at 0x3f8d1c
      REFCNT = 1
    ...
        PADNAME = 0x99aae4(0x9a7d1c) PAD = 0x3f8d0c(0x9a7b44)
        OUTSIDE = 0x99aa74 (fudge)
    
  2. or download this
    my $foo = { kid  => { } };
    $foo->{kid}{parent} = $foo;
    weaken $foo->{kid}{parent};
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2024-04-24 02:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found