CIAO::Lib::Param::Match - handle a list of matched parameters
use CIAO::Lib::Param; $pf = CIAO::Lib::Param->new( $filename ); $pmatch = $pf->match( $template ); printf "number of matched parameters: %d\n", $pmatch->length; while( my $pname = $pmatch->next ) { print "$pname\n" }; # do it all over again $pmatch->rewind;
These routines manipulate the CIAO::Lib::Param::Match object returned by the CIAO::Lib::Param match() method.
$len = $pmatch->length;
returns the number of matched parameters.
$pname = $pmatch->next;
returns the name of the next parameter in the list. It returns undef if at the end of the list.
$pmatch->rewind;
Reset the list so that the next call to next() will return the first element of the list.
CIAO::Lib::Param.
Diab Jerius, <djerius@cpan>
Copyright (C) 2005 by the Smithsonian Astrophysical Observatory
This code is released under the GNU General Public License. You may find a copy at <http://www.fsf.org/copyleft/gpl.html>.
To install CIAO::Lib::Param, copy and paste the appropriate command in to your terminal.
cpanm
cpanm CIAO::Lib::Param
CPAN shell
perl -MCPAN -e shell install CIAO::Lib::Param
For more information on module installation, please visit the detailed CPAN module installation guide.