Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

Excellent replies. (Keep 'em coming!) I'll bundle up a few replies to keep the page size down:

hippo: It's an interesting concern and should probably remain up to the whim of the individual poster,

I agree completely. Once in a while, my individual whim benefits from a little collective influence such as this.

toolic: Regarding the signature, some monks (like me) disable it because it is a distraction from the rest of the post, but we are probably in the minority.

I hadn't considered that. It's probably a pretty good bet that any monk PM-savvy enough (and active enough to care) to use custom CSS to hide pmsig blocks already knows a thing or ten about strictures and warnings (i.e., not part of the target demographic). From a continuity standpoint, though, probably best, then, not to rely on a post making sense iff the signature is visible.

davido on Dominus: If I do advocate for the use of strictures and warnings, I'll also try to point out which aspect of "strict" would have caught some problem in the user's code, or which warning might have been raised had warnings been enabled.

I do like that much better than the blanket "use strict;" 2x4 some monks wield (and I've no doubt taken a swing or two myself with).

BrowserUk: Insisting that every snippet posted is a complete, stand-alone, pedant-compliant work of dogma; is like insisting on a full salt-throwing ritual before demonstrating tying a nappy on a doll. Ie. Meaningless overkill.

I think your analogy itself may have been meaningless overkill, but that won't get in the way of me agreeing with your overall sentiment. :-)

BrowserUk: Perhaps the only thing sillier is worrying about it :)

Perhaps. I could say I see it more as "optimizing" than "worrying", but then I could be rightly accused of worrying about semantics.

moritz: 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.

This ↑ ↑ ↑ is the whole point I was dancing around, I think: i.e., minimizing cognitive load. Well said.


So, where does that leave me? There's still some room for me to be swayed, but what I take away from these replies (colored a bit by my own preferences of course) is that it makes sense to ditch the boilerplate unless it's relevant, but including any pragmas required to successfully run the code (i.e., use 5.010; in examples with say) is still worth it.

Again, thank you all for the most thoughtful replies. Yes, even you, Anonymonk. Please keep them coming, that is, if there's anything more to say.


In reply to Re: When do you include the usual use pragmas in your example code? by rjt
in thread When do you include the usual use pragmas in your example code? by rjt

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

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

    No recent polls found