diff options
| author | fukachan <fukachan> | 2001-03-24 14:32:57 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2001-03-24 14:32:57 +0000 |
| commit | d2ec46bb97b8adaf11bfb43a9cb60205cddd0f07 (patch) | |
| tree | 53ec786c12d04e524877f14e676eb16ce08ac231 /fml/lib/FML/Command.pm | |
| parent | a3e125a194ae5d06f5794e7abf975187975559bb (diff) | |
| download | fml8-d2ec46bb97b8adaf11bfb43a9cb60205cddd0f07.tar.gz fml8-d2ec46bb97b8adaf11bfb43a9cb60205cddd0f07.tar.bz2 fml8-d2ec46bb97b8adaf11bfb43a9cb60205cddd0f07.zip | |
move lock/unlock to FML::Command class
Diffstat (limited to 'fml/lib/FML/Command.pm')
| -rw-r--r-- | fml/lib/FML/Command.pm | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/fml/lib/FML/Command.pm b/fml/lib/FML/Command.pm index e6fe26dd..b5e73f4c 100644 --- a/fml/lib/FML/Command.pm +++ b/fml/lib/FML/Command.pm @@ -55,7 +55,9 @@ sub AUTOLOAD eval qq{ require $pkg; $pkg->import();}; unless ($@) { if ($pkg->can($command)) { + $curproc->lock() if $self->require_lock($command); $pkg->$command($curproc, $args); + $curproc->unlock() if $self->require_lock($command); } else { Log("$pkg module has no $command method"); @@ -67,6 +69,13 @@ sub AUTOLOAD } +sub require_lock +{ + my ($self, $command) = @_; + $command eq 'newml' ? 0 : 1; +} + + =head1 AUTHOR Ken'ichi Fukamachi |
