New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nested BEGIN frames missing #9846
Comments
From zefram@fysh.orgCreated by zefram@fysh.orgMore looking at the call stack during compilation. Here's what the $ perl -e 'sub showstack{for(my$i=0;;$i++){my@c=caller($i);@c||last;print join(",",@c),"\n"}} BEGIN { package wibble; main::showstack() }' Now I'll do the showstack-inside-BEGIN *inside* a BEGIN block: $ perl -e 'sub showstack{for(my$i=0;;$i++){my@c=caller($i);@c||last;print join(",",@c),"\n"}} BEGIN { package wibble; BEGIN { package wobble; main::showstack() } }' I'd expect that middle line instead to be two lines, like this: wibble,-e,1,wibble::BEGIN,1,0,,,256,, possibly with an additional "(eval)" stack frame between them (I'm not As with the previous bug I reported, the behaviour here is consistent Perl Info
|
sgc294@internode.on.net - Status changed from 'new' to 'open' |
From @cpansproutOn Fri Aug 21 16:31:36 2009, zefram@fysh.org wrote:
The first BEGIN block is not returned by caller() for the same reason that sub foo { BEGIN { main::showstack } } does not list foo. foo has not been called. The outer BEGIN block is not called until it has been complied. When the |
@cpansprout - Status changed from 'open' to 'rejected' |
Migrated from rt.perl.org#68718 (status was 'rejected')
Searchable as RT68718$
The text was updated successfully, but these errors were encountered: