Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
People learn a lot more by being shown the why of something than from just being hit upside the head and told not to do it, no matter how experienced the person doing the hitting.
No, you're missing the purpose of my "don't do this" post.

Going back to the innoculation metaphor, I'm providing emergency-room treatment. Surely, this is not a substitute for a person going out to learn how to avoid catching communicable diseases. That happens later (or hopefully earlier).

Getting back to the literal issue here, I'm just saying "stop, don't". And that's a first round of response. But I'm not about to quote the plenty existing literature about why the solution is broken. If there was something not well known about why the solution is broken, I'd have provided more pointers. If you review my posts, you'll see that I've done that frequently.

But knowing that you have to do an atomic operation to provide a lock is fairly basic knowledge. And as I showed in my google reference, the first dozen hits for "perl lock" were all quite informed, so there's almost no excuse for the code that triggered my outburst, except that this is a KLB (in #perl parlance) and will likely lead others astray unless muzzled until they get a clue.

-- Randal L. Schwartz, Perl hacker

In reply to •Re: Re: Re: Re: DON'T USE THIS CODE by merlyn
in thread File::DumbLock by PodMaster

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?

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (2)
As of 2023-09-22 21:08 GMT
Find Nodes?
    Voting Booth?

    No recent polls found