Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Perl
Perl Misc
Untraceable warning: "Warning: Use of "require" without parenthesesis ambiguous at (eval 23) line 1.
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Julian Mehnle, post: 4816990"] Wow, that sure is a helpful technique! $ perl -Mdiagnostics=-w,-t -e'sub foo {eval "require +5;"} foo' Warning: Use of "require" without parentheses is ambiguous at (eval 2) line 1. at (eval 2) line 1 eval 'require+5;' called at -e line 1 main::foo() called at -e line 1 $ perl -Mdiagnostics=-w,-t -e'sub foo {eval qq(#line 1 "my little eval"\n require +5;)} foo' Warning: Use of "" without parentheses is ambiguous at my little eval line 1. at my little eval line 1 eval 'line 1 "my little eval" require +5;' called at -e line 1 main::foo() called at -e line 1 I didn't know that feature, but now I found it is documented at the very bottom of `perldoc perlsyn`. Thanks for the hint! ---- But: $ perl -Mdiagnostics=-w,-t -e'sub foo {eval qq(#line 1 "(my little eval)"\n require +5;)} foo' $ Huh? It seems one cannot use parentheses in line directive filenames, or Perl suppresses the warnings. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (MingW32) Comment: Using GnuPG with Mozilla - [URL]http://enigmail.mozdev.org[/URL] iD8DBQFEbFMowL7PKlBZWjsRAgORAKDBcmvrKw8c5v2b4rqZR6addTdHZgCePCnN AS+kYLgG7UyTZ4V6b1oSqUQ= =JJEK -----END PGP SIGNATURE----- [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Perl
Perl Misc
Untraceable warning: "Warning: Use of "require" without parenthesesis ambiguous at (eval 23) line 1.
Top