develooper Front page | perl.libwww | Postings from January 2006

Re: URI.pm error

Thread Previous | Thread Next
From:
Gisle Aas
Date:
January 24, 2006 05:45
Subject:
Re: URI.pm error
Message ID:
lrmzhl7n9i.fsf@caliper.activestate.com
Nigel Horne <njh@bandsman.co.uk> writes:

> Gisle Aas wrote:
> > Nigel Horne <njh@bandsman.co.uk> writes:
> >
> >>What are the circumstances under which this error appears, and what
> >>can be done to avoid it?
> >>
> >>"Use of uninitialized value in substitution iterator at /usr/share/perl5/URI.pm line 76."
> > What kind of statement do you find at this line?  What version of
> > URI.pm do you have installed?
> 
> Man URI doesn't tell you the version, but running 'r' within CPAN shows
> no updates available, so I must presume it is the most up to date
> version.

You could run 'grep VERSION /usr/share/perl5/URI.pm' to get the
version number out of the file.  If you have the same version as me
you will find:

  $ perl -ne 'print if 72..76' /usr/share/perl5/URI.pm
  sub _init
  {
      my $class = shift;
      my($str, $scheme) = @_;
      $str =~ s/([^$uric\#])/$URI::Escape::escapes{$1}/go;

so the warning means that perl finds characters in your URI that does
not have corresponding entries in %URI::Escape::escapes.  Hmm, I guess
that can happen if you feed it strings with Unicode chars outside the
Latin 1 range.  Can that be the case?

--Gisle

Thread Previous | 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