Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: flock(), dodgy return?

by radiantmatrix (Parson)
on Aug 01, 2007 at 13:46 UTC ( [id://630050]=note: print w/replies, xml ) Need Help??


in reply to flock(), dodgy return?

Well, the first thing I note is that the constants LOCK_EX and LOCK_NB are never defined or imported. Try including use Fcntl ':flock'; to get them (see the Fcntl module docs).

It's worth mentioning that perl would have pointed this out to you had you used strict and warnings. I know it seems like we harp on it, but use strict; use warnings; should really be part of anything you write.

<radiant.matrix>
Ramblings and references
The Code that can be seen is not the true Code
I haven't found a problem yet that can't be solved by a well-placed trebuchet

Replies are listed 'Best First'.
Re^2: flock(), dodgy return?
by danstuken (Novice) on Aug 01, 2007 at 14:03 UTC
    Thank you radiantmatrix

    I'm appalled at myself. Of all the.... The code was taken from a 'test' script I wrote in parallel with the existing code to make sure everything I wanted to do worked. The 'parent' script does use strict and Fcntl ':flock'.

    Thank you again.

    Out of interest, you started with "...first thing I note..." do I have any other lurkers?

      I suspect he means he didn't look any further, since it's a big chunk of code and nothing obvious stood out.

      Update: This is not a complaint. We'd be happy to look further into it if you are still having problems.

        Crikey, don't misunderstand me. I didn't think it was a complaint. I'm very grateful for all the comments and advice this thread has generated.

        Fair comment. It had got to the point where I was doubting myself so much I figured I'd include the whole lot just in case it was something stupid......and whaddya know :/

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2024-04-25 16:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found