Perl: the Markov chain saw | |
PerlMonks |
Source of warning message: "Use of uninitialized value in subroutine entry"by BrowserUk (Patriarch) |
on Dec 15, 2004 at 18:30 UTC ( [id://415141]=perlquestion: print w/replies, xml ) | Need Help?? |
BrowserUk has asked for the wisdom of the Perl Monks concerning the following question: Does anyone know where (which source file(s)) the warning text "Use of uninitialized value in subroutine entry at ..." is issued from? I've encountered this in a few occasions where checking the arguments to the sub being called, both before the call and immediately insde the sub, show no signs of undefs, and the subs function perfectly well. I've usually just disabled that warning around the call in question. The weird thing is, that the warning seems to just suddenly appear, where it previously did not, and I haven't yet tracked down why. It appears as though it is related to source code formatting--which is strange in itself--but that's just a guess. I'd post code to demonstrate the problem, but as has happened before, it has a habit of disappearing once I remove the no warnings 'Unitialized'; code. So I don't currently have a good demonstration of it. One place it has cropped up several times is in code that calls Win32::API. Indeed, the only common theme to the problems are that it generally seems to involve code that drops into XS at some point. However, the error is always attributed to a line in my Perl source rather than the XS call. A vague and wishy-washy description I know, which is why I'd like to track down where the message can be issued and under what circumstances, but my attempts to grep for the text of the message have turned nothing up. Presumably the message is composed at runtime and doesn't appear in the displayed form in the sources at all. Examine what is said, not who speaks.
The end of an era!
"But you should never overestimate the ingenuity of the sceptics to come up with a counter-argument." -Myles Allen"Think for yourself!" - Abigail "Time is a poor substitute for thought"--theorbtwo "Efficiency is intelligent laziness." -David Dunham "Memory, processor, disk in that order on the hardware side. Algorithm, algorithm, algorithm on the code side." - tachyon
Back to
Seekers of Perl Wisdom
|
|