Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: What's the weaken here for?

by Anonymous Monk
on Jan 20, 2012 at 02:29 UTC ( #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
Node Status?
node history
Node Type: note [id://948869]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (8)
As of 2014-12-26 05:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (165 votes), past polls