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

comment on

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

I'm not sure but it seems like B::Xref is buggy, after running perl -MO=Xref,-r,-d

with 5.24 Activestate on

D:\tmp>perl -c syntax OK D:\tmp>more use strict; my $sth; my $lines; while ( my @row = $sth->fetchrow_array ) { #5 print "@row.\n"; #7 push @{$lines},+{status => $row[0]}; #9 }

I'm getting (main) 2 (lexical) $ sth + intro (main) 2 (lexical) $ lines + intro (main) 7 main $ " + used (main) 7 (lexical) @ row + used (main) 9 (lexical) $ lines + used (main) 9 (lexical) @$ lines + used (main) 9 (lexical) $ sth + used (main) 9 (lexical) $ sth + subused (main) 9 (lexical) @ row + intro

please note that @row was "intro"-duced in line 5 inside while and "used" in line 7 and 9,

But the output says used in 7 and introduced in 9, which doesn't really make sense.

(I'm taking no issues (yet) on the "$ sth subused" line which is reporting the ->fetchrow method call.)

Reproduced with 5.18 under Ubuntu
$ cat /tmp/xref.out (main) 2 (lexical) $ sth + intro (main) 3 (lexical) $ lines + intro (main) 7 main $ " + used (main) 7 (lexical) @ row + used (main) 9 (lexical) $ lines + used (main) 9 (lexical) @$ lines + used (main) 9 (lexical) $ sth + used (main) 9 (lexical) $ sth + subused (main) 9 (lexical) @ row + intro

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery FootballPerl is like chess, only without the dice


Added line numbers


Perl seems to optimise to my ($sth,$lines);', that's why '$lines is reported at line 2 not 3.

In reply to B::Xref buggy? by LanX

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?

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

    How do I use this? | Other CB clients
    Other Users?
    Others musing on the Monastery: (4)
    As of 2019-08-24 20:21 GMT
    Find Nodes?
      Voting Booth?

      No recent polls found