File: modules/TrArg.pm Version: 2.30;
TrArg ... TrArg - decode transp arguments Use: Err
Step
strictRoutine Comment Arguments Config Decode Transp configuration parameter D Return true if arg is defined
return ( defined ( $Transp::Args->{$_[0]} ));Decode Decode the transp argument list
Argument values are stored in %ARGS ; $ARGS{$NmArg}=$val
where $NmArg is the 'standard' argument name,
& $Val the value given ( = 0 or 1 for boolean )Dump Dump argument hash.. IsArg return 1 if arg is a know argument keyword IsTrPhase Return true if arg is a transp phase Map Map alias to std arg.. OptStr Prepare string of 'standard' command line options Print pretty argument list Q Return value of an argument, or 'default' if value not supplied
21Sep2001 %Transp::Args -> $Transp::ArgsQdef Return argument attributes -
Eg :- my( IsArg, IsOpt, NmArg, NArg ) = Qdef( $arg ) ;
IsArg .T if a recognised argument
IsOpt .T if a boolean arg ( switch )
NmArg 'Standard argument name ( after alias substitution )
NArg Expected # values following - 0 or 1
OptVAl = 0 or 1 for a boolean argSave Save Args & Options set on command line Set Set argument value .. my( $key, $val ) = @_ ; SetOpt Generate hash from options string..
/xx/yy/nozz => %Opt->{xx}=1 , {yy}=1, {zz}=0T Return T if arg is defined & != default Type Return 0 if unknown, 1 if Boolean, 2 if keyword=val Update Update current args with saved args.. V Print version number Verify Ensure args not completely crazy.. help Display list of args helpdata construct %TrArg::help{} helpstr Display argument spec