summaryrefslogtreecommitdiff
path: root/fml/lib/File/SimpleLock.pm
diff options
context:
space:
mode:
authorfukachan <fukachan>2001-03-20 09:44:57 +0000
committerfukachan <fukachan>2001-03-20 09:44:57 +0000
commitdb1c5797b32dd075bcf455c5300ed82f9b22b8aa (patch)
treecd9c9f2524dcf5a063f1345b53e8681451ab6d51 /fml/lib/File/SimpleLock.pm
parent2198c4ce73b096d94ac6cbc591c86eca0a73b054 (diff)
downloadfml8-db1c5797b32dd075bcf455c5300ed82f9b22b8aa.tar.gz
fml8-db1c5797b32dd075bcf455c5300ed82f9b22b8aa.tar.bz2
fml8-db1c5797b32dd075bcf455c5300ed82f9b22b8aa.zip
rewritten to ErrorMessages::Status module for unification of error
buffer handling.
Diffstat (limited to 'fml/lib/File/SimpleLock.pm')
-rw-r--r--fml/lib/File/SimpleLock.pm12
1 files changed, 5 insertions, 7 deletions
diff --git a/fml/lib/File/SimpleLock.pm b/fml/lib/File/SimpleLock.pm
index ab789d77..3245e81b 100644
--- a/fml/lib/File/SimpleLock.pm
+++ b/fml/lib/File/SimpleLock.pm
@@ -11,9 +11,7 @@ package File::SimpleLock;
use vars qw(%LockedFileHandle %FileIsLocked @ISA $Error);
use strict;
use Carp;
-use File::Errors;
-
-@ISA = qw(File::Errors);
+use ErrorMessages::Status qw(error_set error error_reset);
=head1 NAME
@@ -96,7 +94,7 @@ sub _simple_flock
eval q{
$r = flock($fh, &LOCK_EX);
};
- $self->error_reason($@) if $@;
+ $self->error_set($@) if $@;
if ($r) {
$FileIsLocked{ $file } = 1;
@@ -104,7 +102,7 @@ sub _simple_flock
}
}
else {
- $self->error_reason("cannot open $file");
+ $self->error_set("cannot open $file");
}
return 0;
@@ -124,7 +122,7 @@ sub _simple_funlock
eval q{
$r = flock($fh, &LOCK_UN);
};
- $self->error_reason($@) if $@;
+ $self->error_set($@) if $@;
if ($r) {
delete $FileIsLocked{ $file };
@@ -139,7 +137,7 @@ sub _simple_funlock
=head1 SEE ALSO
L<FileHandle>,
-L<File::Errors>,
+L<ErrorMessages::Status>,
=head1 AUTHOR