Skip Menu |

This queue is for tickets about the File-CounterFile CPAN distribution.

Report information
The Basics
Id: 4452
Status: resolved
Priority: 0/
Queue: File-CounterFile

People
Owner: Nobody in particular
Requestors:
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.02
Fixed in: (no value)



Subject: hardcoded flock constants are not portable
Hi. You use flock($fh, 2) all over the place. That's bad. You should use Fcntl 'LOCK_EX'; flock($fh,LOCK_EX);
To: bug-File-CounterFile [...] rt.cpan.org
CC: "AdminCc of cpan Ticket #4452": ;
Subject: Re: [cpan #4452] hardcoded flock constants are not portable
From: Gisle Aas <gisle [...] ActiveState.com>
Date: 21 Nov 2003 06:46:39 -0800
RT-Send-Cc:
"Guest via RT" <bug-File-CounterFile@rt.cpan.org> writes: Show quoted text
> You use > flock($fh, 2) > > all over the place. > That's bad.
Might be. The perl documentation has always used the numbers directly. I think perl should translate if the numers don't apply. Do you know platforms where it fails? Show quoted text
> You should > > use Fcntl 'LOCK_EX'; > flock($fh,LOCK_EX);
Show quoted text
> > Might be. The perl documentation has always used the numbers > directly. I think perl should translate if the numers don't apply.
Hmm, that should be corrected. Show quoted text
> > Do you know platforms where it fails?
I can't say that I do (my experience is limited to RedHat), but why risk it? The reason vendors go through the trouble of defining symbolic constants is that people can use them, and so that people can know when they are not defined.