Operating System - HP-UX
1752282 Members
4892 Online
108786 Solutions
New Discussion юеВ

perl: Can't locate Math/Round.pm

 
SOLVED
Go to solution
Co van Berkel
Regular Advisor

perl: Can't locate Math/Round.pm

Hi,

# perl -v
This is perl, version 5.005_02 built for PA-RISC1.1

We are migrating from a L2000 HP-UX 11.0 to a rp4440-8 HP-UX 11i v1 (11.11).
There are some perl scripts written by a sysadm who isn't working here any more.
He also installed perl on the old machine's.
Now as we try to migrate one perl script gives the following message:
Can't locate Math/Round.pm in @INC (@INC contains: /opt/perl/lib/5.8.0/PA-RISC1.
1-thread-multi /opt/perl/lib/5.8.0 /opt/perl/lib/site_perl/5.8.0/PA-RISC1.1-thread-multi /opt/perl/lib/site_perl/5.8.0 /opt/perl/lib/site_perl .) at ./get_bdf_info.pl line 4.
BEGIN failed--compilation aborted at ./get_bdf_info.pl line 4.

In the script on line 4 the following command:
use Math::Round;

We don't have any experions whith perl.
What can we do?

Can we copy "/opt/perl/lib/5.8.0/Math/Round.pm" to the new machine?

Rgrgds CvB.
7 REPLIES 7
Stanimir
Trusted Contributor
Solution

Re: perl: Can't locate Math/Round.pm

The problem is, that the Perl cannot find
the module Round.pm on path: @INC.

Try to copy file: Round.pm under:

/opt/perl/lib/5.8.0/PA-RISK1/Math

and try again.

If needed, create directory "Math".

Regards
Co van Berkel
Regular Advisor

Re: perl: Can't locate Math/Round.pm

Hi,

What is the differnets between the "/opt/perl/lib/5.8.0/*" and the "/opt/perl/lib/site_perl/5.8.0/*" directory?

Rgrds CvB.
H.Merijn Brand (procura
Honored Contributor

Re: perl: Can't locate Math/Round.pm

Several.

Core-modules vs. Added modules

Perl comes with a large set of core modules (e.g. Math::BigInt), to which you can add your own prefered set of needed modules (e.g. Math::Round and Tk).

There are More locations. e.g. when you have defined $PERL5LIB, that/those location(s) is also searched for modules.

If Math::Round is not version and/or architecture dependant, you can have it in e.g. /home/perl5/lib/Math/Round.pm and set $PERL5LIB to /home/perl5/lib

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
Stanimir
Trusted Contributor

Re: perl: Can't locate Math/Round.pm


As mentioned above - there are core and added modules in different dirs. Anyway the path to given module must be assigned in order to be found and used by the script.

Co van Berkel
Regular Advisor

Re: perl: Can't locate Math/Round.pm

Hi,
How and/or where can we find the path to given module?
Is this path per script or global?

Rgrds CvB.
Co van Berkel
Regular Advisor

Re: perl: Can't locate Math/Round.pm

Hi,
After copy of the module the script works.
Thanks.

Rgrds CvB.
Co van Berkel
Regular Advisor

Re: perl: Can't locate Math/Round.pm

Thanks to all...

Rgrds CvB.