Grokbase
x

[PATCH] Better flock detection for autodie tests

View PostFlat  Thread  Threaded | Next >
Paul Fenwick [PATCH] Better flock detection for autodie tests
| +1 vote
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
--------------030003040503090501030405
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

G'day p5p,

Craig A. Berry discovered that autodie's tests which attempt to detect
flock() support can cause bogus test failures on older VMS systems:

https://rt.cpan.org/Ticket/Display.html?id=47812

Attached is a trivial patch from Craig that fixes this issue.  It's already
been applied to my upstream repository.

Dave - I have no idea if this would be an issue for people building Perl
5.10.1 on old VMS systems.  You may wish to consider it for inclusion into
maint-5.10 just in case.

All the very best,

Paul

--
Paul Fenwick <pjf@perltraining.com.au> | http://perltraining.com.au/
Director of Training                   | Ph:  +61 3 9354 6001
Perl Training Australia                | Fax: +61 3 9354 2681

--------------030003040503090501030405
Content-Type: text/x-patch;
name="noflock.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="noflock.patch"

--- 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.";

--------------030003040503090501030405--

Thread : [PATCH] Better flock detection for autodie tests
1)
Paul Fenwick Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit G'day p5p, Craig A....
2)
Tux Applying: Better flock detection for autodie tests error: autodie/t/flock.t: does not exist in...
3)
Dave Mitchell Okay, I've applied it (and the previous hints.t fix) to maint. It would be nice, although not...
spacer
View PostFlat  Thread  Threaded | Next >