Beefy Boxes and Bandwidth Generously Provided by pair Networks DiBona
P is for Practical
 
PerlMonks  

Stumped by a warning

by Wiggins (Friar)
on Nov 14, 2012 at 16:03 UTC ( #1003844=perlquestion: print w/ replies, xml ) Need Help??
Wiggins has asked for the wisdom of the Perl Monks concerning the following question:

Operator or semicolon missing before &__inline at (eval 117) line 1 (# +1) (S ambiguous) You used a variable or subroutine call where the par +ser was expecting an operator. The parser has assumed you really mean +t to use an operator, but this is highly likely to be incorrect. For . +..
This warning appears every time I run this program, but it runs anyway.
I am stumped by '&__inline at (eval 117) line 1 (#1)', since I have no evals; the only '&' characters are in '&&' (logical and); and line 117 is a '}' only.

Where/what is the offending code??

-- UPDATE ------ I found the same message in a Ubuntu bug report. It is a 1-line include with +W processing. https://bugs.launchpad.net/ubuntu/+source/perl/+bug/1045250
But no description of Why or what it means.

-- UPDATE 2 ----
removing

require 'sys/ioctl.ph;
stopped the warning message from appearing, and also clean compiles.
replacing with:
{ no warnings; require 'sys/ioctl.ph; }
did not stop the warnings.

It is always better to have seen your target for yourself, rather than depend upon someone else's description.

Comment on Stumped by a warning
Select or Download Code
Re: Stumped by a warning
by frozenwithjoy (Curate) on Nov 14, 2012 at 16:09 UTC
    Please show the relevant code.
Re: Stumped by a warning
by tobyink (Abbot) on Nov 14, 2012 at 16:27 UTC

    Are you using any modules that modify your code while it's being compiled? (Source filters, Devel::Declare-based modules, etc.)

    perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'
Re: Stumped by a warning (carp)
by tye (Cardinal) on Nov 14, 2012 at 16:28 UTC
    Where/what is the offending code??
    BEGIN { $SIG{__WARN__} = sub { require Carp; Carp::cluck( @_ ); }; }

    will tell you. (Be sure to put that before any loading of modules, though.)

    - tye        

      I gave that a try with the following result:

      user@pt--d830:/data/finder$ perl finder.pl Operator or semicolon missing before &__inline at (eval 117) line 1 (# +1) (S ambiguous) You used a variable or subroutine call where the par +ser was expecting an operator. The parser has assumed you really mean +t to use an operator, but this is highly likely to be incorrect. For example, if you say "*foo *foo" it will be interpreted as if you s +aid "*foo * 'foo'". Operator or semicolon missing before &__inline at (eval 117) line 1. at finder.pl line 9 main::__ANON__('Operator or semicolon missing before &__inline + at (eval 117) ...') called at (eval 117) line 1 eval 'sub __extern_inline () { &extern &__inline;} ;' called at /usr/lib/perl/5.14/sys/cdefs.ph line 288 require sys/cdefs.ph called at /usr/lib/perl/5.14/features.ph +line 196 require features.ph called at /usr/lib/perl/5.14/sys/ioctl.ph +line 7 require sys/ioctl.ph called at finder.pl line 21 Ambiguous use of & resolved as operator & at (eval 117) line 1 (#2) (W ambiguous) %, &, and * are both infix operators (modulus, bitwise and, and multiplication) and initial special characters (denoting hashes, subroutines and typeglobs), and you said somethi +ng like *foo * foo that might be interpreted as either of them. We assumed you meant the infix operator, but please try to make it mo +re clear -- in the example given, you might write *foo * foo() if you really meant to multiply a glob by the result of calling a functio +n. Ambiguous use of & resolved as operator & at (eval 117) line 1. at finder.pl line 9 main::__ANON__('Ambiguous use of & resolved as operator & at ( +eval 117) line 1.\x{a}') called at (eval 117) line 1 eval 'sub __extern_inline () { &extern &__inline;} ;' called at /usr/lib/perl/5.14/sys/cdefs.ph line 288 require sys/cdefs.ph called at /usr/lib/perl/5.14/features.ph +line 196 require features.ph called at /usr/lib/perl/5.14/sys/ioctl.ph +line 7 require sys/ioctl.ph called at finder.pl line 21
      I think this must be an internal thing.
      "This is perl 5, version 14, subversion 2 (v5.14.2) built for x86_64-linux-gnu-thread-multi ".
      Thanks for the help...

      It is always better to have seen your target for yourself, rather than depend upon someone else's description.

        The google results say that it is likely a flaw in something generated by h2xs.

        The reason you didn't get details about where the warning came from is because you overrode the __WARN__ handler, probably by doing "use diagnostics;". So comment out that line and you'll likely be told not only what *.ph file is generating the warning but also what module pulled that file in (and what module pulled that module in, etc.).

        (This is yet another example of why it might be a very good idea for eval to suppress warnings, especially "mandatory warnings".)

        - tye        

Re: Stumped by a warning
by toolic (Chancellor) on Nov 14, 2012 at 16:29 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1003844]
Approved by tobyink
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (15)
As of 2014-04-18 15:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (469 votes), past polls