Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Stumped by a warning (carp)

by tye (Sage)
on Nov 14, 2012 at 16:28 UTC ( [id://1003851]=note: print w/replies, xml ) Need Help??


in reply to Stumped by a warning

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        

Replies are listed 'Best First'.
Re^2: Stumped by a warning (carp)
by Wiggins (Hermit) on Nov 15, 2012 at 15:43 UTC
    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        

        I restored the 'use warnings;' and 'require /sys/ioctl.ph;' and then comment out the 'use diagnostics;'.
        The warning did not display .
        Maybe there can be too much introspection.

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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1003851]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2024-03-19 05:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found