use Carp;
use Path::Class::File ();
use File::Spec;
-use Fcntl qw/:flock/;
+use Fcntl qw/:DEFAULT :flock/;
=head1 NAME
sub import {
my $self = shift;
- my $lockpath = File::Spec->tmpdir . '/.dbictest_global.lock';
+ my $lockpath = DBICTest::RunMode->tmpdir->file('.dbictest_global.lock');
{
my $u = local_umask(0); # so that the file opens as 666, and any user can lock
- open ($global_lock_fh, '>', $lockpath)
+ sysopen ($global_lock_fh, $lockpath, O_RDWR|O_CREAT)
or die "Unable to open $lockpath: $!";
}