Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

Re: "no warnings 'uninitialized'" failing

by LanX (Sage)
on Oct 16, 2017 at 14:18 UTC ( #1201446=note: print w/replies, xml ) Need Help??

in reply to "no warnings 'uninitialized'" failing

I'm confused, warnings - like most pragmas - is lexically scoped˛, you can't switch off a warning inside another module.

If is your file, I'd clarify first if $data is really not initialized.

NB: it's possible (and easily implemented) that a module delegates the warning line and file to the caller, probably that's what XML::Simple is doing. *

Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!


*) At least it's using Carp

˛) from warnings : This means that the scope of the warning pragma is limited to the enclosing block. It also means that the pragma setting will not leak across files (via use, require or do). This allows authors to independently define the degree of warning checks that will be applied to their module. (emphasis added)

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2022-08-17 07:28 GMT
Find Nodes?
    Voting Booth?

    No recent polls found