Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

Also, weaken is working properly on the coderef. You can see this by checking the ref counts using Devel::Peek. The ref count just never reaches 0 because perl itself is holding the last reference.

Weakening a non-closure sub is also not particularly useful. Weakening is meant to be used to prevent memory leaks, but the existence of a non-closure sub can't cause memory leaks. perl has to have a reference to the compiled sub anyway, and without a closure you can't create reference loops.


In reply to Re: weaken CODEREF by Haarg
in thread weaken CODEREF by powerman

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    [Your Mother]: There is a nice looking—don’t know first hand—new tool being market for removing ticks.
    [Your Mother]: (marketed)
    [Lotus1]: at least ticks don't fly
    [1nickt]: We have a new tick in cenral New Jersey this year. The Lone Star tick -- no Lyme, but will give you an allergy to red meat!
    [Your Mother]: "Tick Twister."
    [1nickt]: My sister lives in the Sydney suburbs (carved out of the bush) and they have the Paralysis tick -- leavs you quadriplegic!
    [perldigious]: Hmm, thanks Lotus1... perldigious scribbles note to buy lots of opossums as "pets" in the future to hang around outside his property. :-P
    [1nickt]: You must twist and pull! If you burn, use tea tree oil etc, the tick barfs (inside your blood vessel) and you get all the loevely bacteria in his gut transferred to yours.
    [1nickt]: tweesers work just fine
    [hippo]: Hope everyone else is enjoying their lunch too.

    How do I use this? | Other CB clients
    Other Users?
    Others exploiting the Monastery: (14)
    As of 2017-05-24 13:08 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?