Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

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.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (14)
As of 2016-10-21 09:38 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (288 votes). Check out past polls.