Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: When do you include the usual use pragmas in your example code?

by moritz (Cardinal)
on Aug 03, 2013 at 20:33 UTC ( [id://1047739]=note: print w/replies, xml ) Need Help??


in reply to When do you include the usual use pragmas in your example code?

When I post a complete, runnable piece of code, I add the usual boilerplate. When I correct only a few lines of the OP's code, I don't.

I find it rather important to include the use 5.010; when I use say (which I do a lot, actually) in my examples, because the error message is often quite bad when you forget to include the pragma (often it complains that there is no method say, because perl parsed it as indirect method syntax).

And newcomers already have enough to struggle with, I don't want to increase their cognitive load by using a convenience subroutine that then makes their live harder.

Log In?
Username:
Password:

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

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

    No recent polls found