diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/File/Temp/t/lock.t | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/lib/File/Temp/t/lock.t b/lib/File/Temp/t/lock.t index fae86f2a83..cd62d541d5 100644 --- a/lib/File/Temp/t/lock.t +++ b/lib/File/Temp/t/lock.t @@ -5,14 +5,16 @@ use Test::More; use strict; use Fcntl; -BEGIN {use_ok( "File::Temp" ); } - -# 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; +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 => 3; + } + + use_ok( "File::Temp" ); } # Get a tempfile with O_EXLOCK |