Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
I'm trying to get a test script working, to determine if Devel::Leak will actually be useful for me:
#!/usr/bin/debugperl -w # use strict; use Devel::Leak; use Scalar::Util qw/weaken/; my ($handle); leak(); my $test1 = "foo"; my $count1 = Devel::Leak::NoteSV ($handle); leak(); $test1 = undef; my $count2 = Devel::Leak::CheckSV($handle); print "$count1 $count2\n"; exit(0); sub leak { for (1..3) { my $h = {}; $h->{myself} = $h; #weaken($h->{myself}); $h->{label} = 'testing $_'; } }
I'm using the debian package perl-debug, which has compile-time options: DEBUGGING MULTIPLICITY PERL_IMPLICIT_CONTEX. But I see no difference in the output with the debug perl, despite the wisdom of the monks at node_id=642604 and node_id=485409 and node_id=447341. All I get is hex addresses, and I don't see the destruction of "foo" which was stored in $test1:
debugperl new 0x79b490 : new 0x79b4a0 : new 0x79b4b0 : new 0x79b4c0 : new 0x79b4d0 : new 0x79b4e0 : new 0x79b4f0 : new 0x79b500 : new 0x6c7290 : 3014 3023
Is there a way to peek inside the leaks?

In reply to Making Devel::Leak useful by brycen

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

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?

What's my password?
Create A New User
Domain Nodelet?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2023-02-09 08:38 GMT
Find Nodes?
    Voting Booth?
    I prefer not to run the latest version of Perl because:

    Results (44 votes). Check out past polls.