Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: print statements in perl pakages seem to be masked from STDOUT

by AnomalousMonk (Archbishop)
on Mar 07, 2018 at 18:06 UTC ( [id://1210467]=note: print w/replies, xml ) Need Help??


in reply to print statements in perl pakages seem to be masked from STDOUT

I started putting print statements in the methods of the package and they were printing on STDOUT ... Suddenly they stopped.

So either the way modules work suddenly changed, or else something in your code and/or system did. I just want to reinforce the idea, already expressed directly or indirectly by other monks, that the latter possibility is by far the most likely.

Are you even working on the code you think you're working on? Have you inadvertently started working on a different set of similar or identical files? I remember a jolly hour or two I once spent debugging some C/C++ code. I happily tried one fix after another; none had any effect. I finally noticed that one of the changes I had made was not syntactically correct, but had compiled anyway. I tried inserting the magical  snifiasdha; statement and compiling again. The compiler was still happy. The penny finally dropped. It turned out that another programmer had placed a huge block of code into a

#if 0 ... ... #endif
"block comment" that my syntax highlighter could not detect, and I had been "debugging" dead code. Massive facepalm. Thus do we live and learn.


Give a man a fish:  <%-{-{-{-<

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (2)
As of 2024-04-26 00:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found