-
Notifications
You must be signed in to change notification settings - Fork 560
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
caller() filenames broken by "use" #9845
Comments
From zefram@fysh.orgCreated by zefram@fysh.orgI'm looking at the stack, with caller(), during compilation. (Not just $ cat x0.pm Observe that the direct caller of x0::import is correctly ascribed the $ perl -e 'use x0 (); use x0' A bit of deconstruction reveals that it's actually just one (implicit) $ perl -e 'BEGIN { require x0; x0->import }' This is annoying because I wanted to use caller() to get at the lexical Perl Info
|
From zefram@fysh.orgI wrote:
Additional information: this bug is present in every perl version at least -zefram |
From p5p@perl.wizbit.be
[snip] That does not seem to be the case: $ cat x1.pm $ cat rt-68712-1.pl BEGIN { for(my$i=0;;$i++) { BEGIN { for(my$i=0;;$i++) { main,x1.pm,23,main::BEGIN,1,0,,,0, $ cat rt-68712-2.pl BEGIN { for(my$i=0;;$i++) { BEGIN { for(my$i=0;;$i++) { __END__ main,x1.pm,22,main::BEGIN,1,0,,,0, Adding the require x1 or do "x1.pm" in a separate block also seems to work: #!/usr/bin/perl -l BEGIN { for(my$i=0;;$i++) { BEGIN { for(my$i=0;;$i++) { main,rt-68712-3.pl,27,main::BEGIN,1,0,,,0, (same output for { do "x0.pm" }) Best regards, Bram |
The RT System itself - Status changed from 'new' to 'open' |
From @cpansproutFixed by b2ef6d4. |
@cpansprout - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#68712 (status was 'resolved')
Searchable as RT68712$
The text was updated successfully, but these errors were encountered: