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

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

Thread Next
From:
Craig A. Berry
Date:
July 2, 2001 12:11
Subject:
[PATCH perl@11059] UCD.pm: if at first you don't succeed,croak?
Message ID:
5.1.0.14.0.20010702140058.01b6c9c0@exchi01
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.

--- 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 {



Thread Next


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