diff options
| author | fukachan <fukachan> | 2001-11-07 04:07:40 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2001-11-07 04:07:40 +0000 |
| commit | 568ce39b3ab75c60f0fdba263429fe443dd07e8e (patch) | |
| tree | c6239123c45e79030a3d6751a2ebc6398a5636e3 /fml/lib | |
| parent | 6776704911609559c2ce5837ae69c1d536d8f618 (diff) | |
| download | fml8-568ce39b3ab75c60f0fdba263429fe443dd07e8e.tar.gz fml8-568ce39b3ab75c60f0fdba263429fe443dd07e8e.tar.bz2 fml8-568ce39b3ab75c60f0fdba263429fe443dd07e8e.zip | |
command_line_argv_find()
Diffstat (limited to 'fml/lib')
| -rw-r--r-- | fml/lib/FML/Process/Utils.pm | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/fml/lib/FML/Process/Utils.pm b/fml/lib/FML/Process/Utils.pm index 7177bab5..28bc6d84 100644 --- a/fml/lib/FML/Process/Utils.pm +++ b/fml/lib/FML/Process/Utils.pm @@ -4,7 +4,7 @@ # All rights reserved. This program is free software; you can # redistribute it and/or modify it under the same terms as Perl itself. # -# $FML: Utils.pm,v 1.1 2001/11/04 03:46:50 fukachan Exp $ +# $FML: Utils.pm,v 1.2 2001/11/05 13:01:00 fukachan Exp $ # package FML::Process::Utils; @@ -65,6 +65,23 @@ sub command_line_argv } +sub command_line_argv_find +{ + my ($curproc, $pat) = @_; + my $argv = $curproc->command_line_argv(); + + if (defined $pat) { + for my $x (@$argv) { + if ($x =~ /^$pat/) { + return $1; + } + } + } + + return undef; +} + + sub command_line_options { my ($curproc) = @_; |
