Hamish wrote: > > > Oh no: > > > > > > for arg in sys.argv: > > > args += arg+" " > > > I have updated the g.parser help page Python example with the fixed args > usage, but I notice the Perl example there (6.3cvs version only) is > broken as well. > > http://freegis.org/cgi-bin/viewcvs.cgi/grass6/general/g.parser/description.html > > if( $ARGV[0] ne '@ARGS_PARSED@' ){ > my $arg = ""; > for (my $i=0; $i < @ARGV;$i++) { > $arg .= " $ARGV[$i] "; > } > system("$ENV{GISBASE}/bin/g.parser $0 $arg"); > exit; > }
Perl's system() supports both scalar and array context, so the array version should be used. Also, Perl has exec(), which is preferable to system()+exit(). > Also I notice a difference in the python version where main(): now ends > with "return". Does this matter? A "return" at the end of a method should be a no-op. -- Glynn Clements <[EMAIL PROTECTED]> _______________________________________________ grass-dev mailing list [email protected] http://grass.itc.it/mailman/listinfo/grass-dev

