Subject: | t/lock.t uses defunct BEGIN block |
The use of 'use_ok' inside a BEGIN block before stipulating a plan now
causes a failure:
t/lock..........You tried to run a test without a plan at t/lock.t line 8.
BEGIN failed--compilation aborted at t/lock.t line 8.
# Looks like your test died before it could output anything.
t/lock.......... Dubious, test returned 255 (wstat 65280, 0xff00)
No subtests run
The attached patch fixes this.
Subject: | fix.patch |
diff -r File-Temp-0.19/t/lock.t File-Temp-patched/t/lock.t
8c8,15
< BEGIN {use_ok( "File::Temp" ); }
---
> BEGIN {
> # See if we have O_EXLOCK
> eval { &Fcntl::O_EXLOCK; };
> if ($@) {
> plan skip_all => 'Do not seem to have O_EXLOCK';
> } else {
> plan tests => 4;
> }
10,15c17
< # see if we have O_EXLOCK
< eval { &Fcntl::O_EXLOCK; };
< if ($@) {
< plan skip_all => 'Do not seem to have O_EXLOCK';
< } else {
< plan tests => 3;
---
> use_ok( "File::Temp" );