develooper Front page | perl.vmsperl | Postings from May 2002

Re: [PATCH @16611] lib/ExtUtils/t/Constant.t on VMS

From:
Jarkko Hietaniemi
Date:
May 16, 2002 16:41
Subject:
Re: [PATCH @16611] lib/ExtUtils/t/Constant.t on VMS
Message ID:
20020517024128.I23178@alpha.hut.fi
On Thu, May 16, 2002 at 02:13:15PM -0500, Craig A. Berry wrote:
> readdir() returns lower-cased filenames, and if there is no extension a 
> trailing dot is present.  This makes the test expect what it will get.

Thanks, applied.

> --- lib/ExtUtils/t/Constant.t;-0        Mon May 13 19:07:15 2002
> +++ lib/ExtUtils/t/Constant.t   Thu May 16 13:47:14 2002
> @@ -648,11 +648,12 @@
>  
>  sub check_for_bonus_files {
>    my $dir = shift;
> -  my %expect = map {$_, 1} @_;
> +  my %expect = map {($^O eq 'VMS' ? lc($_) : $_), 1} @_;
>  
>    my $fail;
>    opendir DIR, $dir or die "opendir '$dir': $!";
>    while (defined (my $entry = readdir DIR)) {
> +    $entry =~ s/\.$// if $^O eq 'VMS';  # delete trailing dot that indicates no extension
>      next if $expect{$entry};
>      print "# Extra file '$entry'\n";
>      $fail = 1;
> [end of patch]

-- 
$jhi++; # http://www.iki.fi/jhi/
        # There is this special biologist word we use for 'stable'.
        # It is 'dead'. -- Jack Cohen



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About