Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: use warnings and debug messages

by salva (Canon)
on Mar 06, 2017 at 14:50 UTC ( [id://1183762]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub debug {
      warn join '', map $_ // '<undef>', @_, "\n";
    ...
    # and then...
    debug "x=", $x, " y=", $y;
    
  2. or download this
    sub debugf {
      my $fmt = shift;
    ...
    }
    
    debugf "x=%s y=%s", $x, $y; # <-- always using %s!
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (2)
As of 2024-04-24 14:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found