Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
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 ( #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.


Comment on Re: When do you include the usual use pragmas in your example code?
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (14)
As of 2014-07-28 16:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (204 votes), past polls