Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
And here is "perl -MO=Deparse,-l" output:use strict; use warnings; #3 sub foo () { print("F1"); print("F2"); print("F3"); } #9
So the "#line" before the sub declaration is in fact the end of the sub, not its begin. How can I find out where it really starts knowing that pragmas like "strict" do change how the sub is rendered?#line 8 "foo.pl" sub foo () { use warnings; use strict 'refs'; #line 5 "foo.pl" print 'F1'; #line 6 "foo.pl" print 'F2'; #line 7 "foo.pl" print 'F3'; } foo.pl syntax OK
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: B::Deparse and sub line numbers
by toolic (Bishop) on Oct 29, 2012 at 14:21 UTC | |
by Anonymous Monk on Oct 29, 2012 at 20:43 UTC |