From db1c5797b32dd075bcf455c5300ed82f9b22b8aa Mon Sep 17 00:00:00 2001 From: fukachan Date: Tue, 20 Mar 2001 09:44:57 +0000 Subject: rewritten to ErrorMessages::Status module for unification of error buffer handling. --- fml/lib/File/SimpleLock.pm | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'fml/lib/File/SimpleLock.pm') 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, -L, +L, =head1 AUTHOR -- cgit v1.2.1