in reply to Re: print statements in perl pakages seem to be masked from STDOUT
in thread print statements in perl pakages seem to be masked from STDOUT
Looks like you're pointing me in the right direction. so I will pose a question: I am just dropping print statements in the package (the module).
# In the main .pl use ThisPackage; ... my $the_package = ThisPackage->new(); ... (this other guys code) print "What is the value of var_here? $var_here\n"; # my debug statem +ent gets printed as What is the value of var_here? CornFlakes (more of this other guys code) # In the package: package ThisPackage; ... sub new{ my ($class, $self)=@_; ... } (this other guys code) print "What is the value of var_in_package? $var_in_package\n"; # my +debug statement does NOT get printed out as the statement in the main + program did. (more of this other guys code)
should I expect it to print is STDOUT? The print statements I put in the .pl file are printed to STDOUT but anything inside the package does not get printed
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: print statements in perl pakages seem to be masked from STDOUT
by Eily (Monsignor) on Mar 07, 2018 at 17:09 UTC | |
|
Re^3: print statements in perl pakages seem to be masked from STDOUT
by pryrt (Abbot) on Mar 07, 2018 at 17:16 UTC |