daxim has asked for the wisdom of the Perl Monks concerning the following question:
I am not able to step through with the debugger, alas demoting the statements to run-time loading/importing makes the bug disappear.
$ cat foo #!/usr/bin/env perl5.10.1 use utf8; use strict; use CGI::Carp qw(fatalsToBrowser); $c; $ ./foo # ok Status: 500 Content-type: text/html <h1>Software error:</h1> <pre>Global symbol "$c" requires explicit package name at ./ +foo line 5. Execution of ./foo aborted due to compilation errors. </pre> <p> For help, please send mail to this site's webmaster, giving this error + message and the time and date of the error. </p> [Mon Jan 24 xx:xx:xx 2011] foo: Global symbol "$c" requires explicit p +ackage name at ./foo line 5. [Mon Jan 24 xx:xx:xx 2011] foo: Execution of ./foo aborted due to comp +ilation errors. $ cat bar #!/usr/bin/env perl5.12.1 use utf8; use strict; use CGI::Carp qw(fatalsToBrowser); $c; $ ./bar # nok BEGIN not safe after errors--compilation aborted at /usr/lib/perl5/5.1 +2.1/Carp.pm line 104. $ cat quux #!/usr/bin/env perl5.12.1 # use utf8; use strict; use CGI::Carp qw(fatalsToBrowser); $c; $ ./quux # ok Status: 500 Content-type: text/html <h1>Software error:</h1> <pre>Global symbol "$c" requires explicit package name at ./ +quux line 5. Execution of ./quux aborted due to compilation errors. </pre> <p> For help, please send mail to this site's webmaster, giving this error + message and the time and date of the error. </p> [Mon Jan 24 xx:xx:xx 2011] quux: Global symbol "$c" requires explicit +package name at ./quux line 5. [Mon Jan 24 xx:xx:xx 2011] quux: Execution of ./quux aborted due to co +mpilation errors.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: utf8 whacks Carp in 5.12.1
by Anonyrnous Monk (Hermit) on Jan 25, 2011 at 05:22 UTC | |
by andal (Hermit) on Jan 25, 2011 at 13:34 UTC |