"Undefined subroutine"

B

B H

Trying to use an "old" script which I have not written myself. It has worked
previously
under installation on other machines (with possible older versions of Perl).
The problem is that I do not remember all the modules I loaded and which
modifications I
did in order to make it work last time.
I have used CPAN and made and installed URI (at least I think I did it), but
I do not
know if this is enough.
I still get the following error:
===
Undefined subroutine &URI::URL called at /home/c4n/bin/<scriptname> line
488.

Line 488:

my $urlobj = new URI::URL( $values[$i], $self->{'url'} );
===
I am not experienced in Perl, so maybe the error is obvious. But now I am
tired of banging my head against the wall.
Could there be problems related to a possible change of version of Perl
since
I last used this script?
Can I have done something wrong during CPAN-download ( I did make, test
and install)?
Something else?

Borge
 
J

Jim Keenan

B said:
Trying to use an "old" script which I have not written myself. It has worked
previously
under installation on other machines (with possible older versions of Perl).
The problem is that I do not remember all the modules I loaded and which
modifications I
did in order to make it work last time.
I have used CPAN and made and installed URI (at least I think I did it), but
I do not
know if this is enough.
I still get the following error:
===
Undefined subroutine &URI::URL called at /home/c4n/bin/<scriptname> line
488.

Line 488:

my $urlobj = new URI::URL( $values[$i], $self->{'url'} );
===

Assuming you have correctly installed the latest version of URI, call

perldoc URI

This shows the documentation. I infer from a note in the
"Authors/Acknowledgments" section that this module supercedes the older
URI::URL module. I also fail to find a &URL in the current version. So
that explains why you get the "undefined subroutine" error.

I recommend studying the documentation for URI and and recoding your
script as needed.

Jim Keenan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,997
Messages
2,570,240
Members
46,828
Latest member
LauraCastr

Latest Threads

Top