summaryrefslogtreecommitdiff
path: root/fml/lib/FML/Lock.pm
diff options
context:
space:
mode:
authorfukachan <fukachan>2001-02-20 04:55:15 +0000
committerfukachan <fukachan>2001-02-20 04:55:15 +0000
commitfc634e5aa605ecfc44ba3aaa1fe6d9b1dddca75c (patch)
tree682b3162c34e57de3c77ab91970e8a1b90ef182c /fml/lib/FML/Lock.pm
parent24e734d78a1bf9c55f06dd70cd0b2849c49816e1 (diff)
downloadfml8-fc634e5aa605ecfc44ba3aaa1fe6d9b1dddca75c.tar.gz
fml8-fc634e5aa605ecfc44ba3aaa1fe6d9b1dddca75c.tar.bz2
fml8-fc634e5aa605ecfc44ba3aaa1fe6d9b1dddca75c.zip
clean up document
Diffstat (limited to 'fml/lib/FML/Lock.pm')
-rw-r--r--fml/lib/FML/Lock.pm56
1 files changed, 26 insertions, 30 deletions
diff --git a/fml/lib/FML/Lock.pm b/fml/lib/FML/Lock.pm
index 465c1053..973f7cf7 100644
--- a/fml/lib/FML/Lock.pm
+++ b/fml/lib/FML/Lock.pm
@@ -12,6 +12,31 @@ use vars qw(%LockedFileHandle %FileIsLocked @ISA $Error);
use strict;
use Carp;
+=head1 NAME
+
+FML::Lock - simple lock by flock(2)
+
+=head1 SYNOPSIS
+
+ require FML::Lock;
+ my $lockobj = new FML::Lock;
+ $lockobj->lock( { file => $lock_file } ) || croak "fail to lock";
+
+ ... do someting under locking ...
+
+ $lockobj->unlock( { file => $lock_file } ) || croak "fail to unlock";
+
+=head1 DESCRIPTION
+
+FML::Lock.pm contains several interfaces for several files,
+for example, Lockfiles, sysLock() (not yet implemented).
+
+=item Lock( $message )
+
+The argument is the message to Lock.
+
+=cut
+
require Exporter;
@ISA = qw(Exporter);
@@ -120,42 +145,14 @@ sub _simple_funlock
}
-=head1 NAME
-
-FML::Lock.pm - several interfaces to open several files
-
-
-=head1 SYNOPSIS
-
-To import Lock(),
-
- use FML::Lock qw(Lock);
- &Lock( $Lock_message );
-
-
-=head1 DESCRIPTION
-
-FML::Lock.pm contains several interfaces for several files,
-for example, Lockfiles, sysLock() (not yet implemented).
-
-=item Lock( $message )
-
-The argument is the message to Lock.
-
-
-
=head1 SEE ALSO
-L<FML::Date>,
-L<FML::Config>,
-L<FML::BaseSystem>,
L<FileHandle>
=head1 AUTHOR
Ken'ichi Fukamachi <F<fukachan@fml.org>>
-
=head1 COPYRIGHT
Copyright (C) 2000 Ken'ichi Fukamachi
@@ -163,13 +160,12 @@ Copyright (C) 2000 Ken'ichi Fukamachi
All rights reserved. This program is free software; you can
redistribute it and/or modify it under the same terms as Perl itself.
-
=head1 HISTORY
FML::Lock appeared in fml5 mailing list driver package.
See C<http://www.fml.org/> for more details.
-
=cut
+
1;