Skip Menu |

This queue is for tickets about the autodie CPAN distribution.

Report information
The Basics
Id: 47812
Status: resolved
Priority: 0/
Queue: autodie

Owner: PJF [...]
Requestors: cberry [...]

Bug Information
Severity: Normal
Broken in: 2.06
Fixed in: (no value)

Subject: [PATCH] better flock checking in flock.t
Download (untitled) / with headers
text/plain 605b
Hi Paul. I was doing a test core build on an older VMS system that does not have flock. The flock.t test died with something like: $ perl [-.lib.autodie.t]flock.t The flock() function is unimplemented at [-.lib.autodie.t]flock.tline 26. %SYSTEM-F-IVCHAN, invalid I/O channel The attached patch puts the first flock call inside an eval so we bow out gracefully and get your intended skip message: $ perl [-.lib.autodie.t]flock.t 1..0 # SKIP flock on my own test not supported on this system. You could also muck about without $Config{d_flock} and $Config{d_fcntl_can_lock}, but this seems simpler.
Subject: noflock.patch
Download noflock.patch
text/x-diff 427b
--- lib/autodie/t/flock.t;-0 Fri Jul 3 09:41:06 2009 +++ lib/autodie/t/flock.t Sat Jul 11 09:45:35 2009 @@ -23,7 +23,7 @@ if ($@) { plan skip_all => "Cannot lock this test on this system."; } -my $flock_return = flock($self_fh, LOCK_EX | LOCK_NB); +my $flock_return = eval { flock($self_fh, LOCK_EX | LOCK_NB); }; if (not $flock_return) { plan skip_all => "flock on my own test not supported on this system.";
Download (untitled) / with headers
text/plain 314b
G'day Craig, Thank-you very much for this. I've applied it as 13dbb87 to my repository on github, with you marked as the author. I'm guessing in the interests of getting Perl 5.10.1 to build cleanly this should also go into maint-5.10, I'll drop a note to p5p now. Many thanks again, and all the best, Paul

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to