ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Conor MacNeill" <co...@m64.com>
Subject RE: [PATCH] runant.pl
Date Fri, 25 Aug 2000 12:04:49 GMT
How about I commit the original submission and then you can send a patch for
it?

Conor


> -----Original Message-----
> From: Michael McCallum [mailto:michael@spinsoftware.co.nz]
> Sent: Friday, 25 August 2000 9:19
> To: ant-dev@jakarta.apache.org
> Subject: Re: [PATCH] runant.pl
>
>
> the perl one liner would be
>
> <this>
>   #add jar files. I am sure there is a perl one liner to do this.
>   my $jarpattern="$HOME/lib/*.jar";
>   my @jarfiles =glob($jarpattern);
>   print "jarfiles=@jarfiles\n" if ($debug);
>   my $jar;
>   foreach $jar (@jarfiles )
>     {
>       $localpath.="$s$jar";
>     }
> <becomes>
>   $localpath .= "$s" . join( "$s", glob( $jarpattern ) );
>
>  but for readabiliy you probably want...
>
>    my $jarpattern = "$HOME/lib/*.jar";
>    my @jarfiles = glob( $jarpattern );
>    $localpath .= "$s" . join( "$s", glob( @jarfiles ) );
>
> p.s.
>
> you should make you env safe...run with a -T -w tags eg
> /usr/bin/perl -T -w
> admittedly you get heaps more warning messages but it stops you
> making simples mistakes
> you might overlook.
> Although you will have to resolve the insecure dependency using the glob.
> If you like I will submit a safer version later but have to work now :)
>
> Michael
>
> also to make it portable use /usr/bin/perl not /usr/local/perl
> most installations will have it here.
> --- BEGIN GEEK CODE BLOCK ---
> Version 3.12
> GCS d+(-) s:- a-- C++(+++)$ UL++++(H)(S)$ P+++$ L+++$>++++
> E--- W++ N++ o++ K? !w() O? !M V? PS+ PE+++ Y+ t+ 5++ X++
> R(+) !tv b++(++++) D++ G>++ e++> h--()(*) r+ y+()
> --- END GEEK CODE BLOCK ---
>


Mime
View raw message