develooper Front page | perl.perl5.porters | Postings from July 2001

Re: [PATCH perl@11059] UCD.pm: if at first you don't succeed, croak?

Thread Previous
From:
Jarkko Hietaniemi
Date:
July 2, 2001 12:26
Subject:
Re: [PATCH perl@11059] UCD.pm: if at first you don't succeed, croak?
Message ID:
20010702142637.T19034@chaos.wustl.edu
On Mon, Jul 02, 2001 at 02:11:23PM -0500, Craig A. Berry wrote:
> The existing logic in openunicode() bails out if it fails to open the first 
> filespec it tries.  I believe the intent is to iterate through @INC until it 
> successfully finds and opens the file or exhausts the list.

Oops.  Thanks, applied.

> --- lib/Unicode/UCD.pm;-0       Sun Jul  1 01:56:14 2001
> +++ lib/Unicode/UCD.pm  Mon Jul  2 14:49:25 2001
> @@ -44,6 +44,7 @@
>         for my $d (@INC) {
>             use File::Spec;
>             $f = File::Spec->catfile($d, "unicode", @path);
> +           next unless -f $f;
>             if (open($$rfh, $f)) {
>                 last;
>             } else {
> 

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

Thread Previous


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