Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Stumped by a warning (carp)

by tye (Sage)
on Nov 14, 2012 at 16:28 UTC ( #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
Node Status?
node history
Node Type: note [id://1003851]
help
Chatterbox?
[LanX]: qwiud you sthink so?
[LanX]: zxwqbd good idea! :)
LanX embraces his new habit spqopiwjdnq
[ambrus]: qQUkZTmHTuKxStGT- BzTIK9gdudif7TkTLI t3mnF144UaAZjkknXY 8nN-QM19wHBsTrp5vB lEYU_Kksa7X1RIBB4x EWLD5X7SW3jGX5ryfN OMn_yL5FTdQxzjhtyX mKN9sjUCzBNHK5Rrp0 S2WMUvIb1i9aZFgjtq VR0GH1bjPMvm1G16iz hBqc1U6toPd4FbJOFj VsOeT745AN1_pO88rD SRAYKtBZwCZedESZmN mvutrOTHiSNwflB- pRfn_k
[Eily]: so far it seems to work
Your Mother reminds the monks they should be grateful not to share an office, lest they be subjugated to constant inanities like, "Czech please!"
[LanX]: what's strange is that the "Cowboy you said this already" message is missing #dqiwd
[LanX]: YM: BTW learn to mute your humanity
[Your Mother]: Cumin? Now I want tacos...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (14)
As of 2017-03-27 16:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (320 votes). Check out past polls.