Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: "no warnings 'uninitialized'" failing

by LanX (Saint)
on Oct 16, 2017 at 14:18 UTC ( [id://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 Data.pm 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!

update

*) 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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (6)
As of 2024-04-23 14:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found