Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Crypt::Random makerandom exports and UNIVERSAL.pm

by steves (Curate)
on Nov 01, 2004 at 00:06 UTC ( [id://404170]=perlquestion: print w/replies, xml ) Need Help??

steves has asked for the wisdom of the Perl Monks concerning the following question:

Is anyone familiar with this problem? A Google search turns up some notes -- enough for me to verify things with a test -- but I'm not sure how to fix things.

The problem is this: When using modules that use Crypt::Random, I get errors like this:
"makerandom" is not exported by the Crypt::Random module at /usr/local +/lib/perl5 /site_perl/5.6.1/Crypt/Random/Generator.pm line 12 "makerandom_itv" is + not exported by the Crypt::Random module at /usr/local/lib/perl5/sit +e_perl/5.6.1/Crypt/Random/Generator.pm line 12 "makerandom_octet" is not exported by the Crypt::Random module at /usr +/local/lib/perl5/site_perl/5.6.1/Crypt/Random/Generator.pm line 12 Can't continue after import errors at /usr/local/lib/perl5/site_perl/5 +.6.1/Crypt/Random/Generator.pm line 12 BEGIN failed--compilation aborted at /usr/local/lib/perl5/site_perl/5. +6.1/Crypt/Random/Generator.pm line 12, <GEN0> line 1. Compilation failed in require at /usr/local/lib/perl5/site_perl/5.6.1/ +Crypt/Random.pm line 18, <GEN0> line 1. BEGIN failed--compilation aborted at /usr/local/lib/perl5/site_perl/5. +6.1/Crypt/Random.pm line 18, <GEN0> line 1. Compilation failed in require at /usr/local/lib/perl5/site_perl/5.6.1/ +Crypt/DH.pm line 6, <GEN0> line 1. BEGIN failed--compilation aborted at /usr/local/lib/perl5/site_perl/5. +6.1/Crypt/DH.pm line 6, <GEN0> line 1. Compilation failed in require at /usr/local/lib/perl5/site_perl/5.6.1/ +Net/SSH/Perl/Kex/DH1.pm line 13, <GEN0> line 1. BEGIN failed--compilation aborted at /usr/local/lib/perl5/site_perl/5. +6.1/Net/SSH/Perl/Kex/DH1.pm line 13, <GEN0> line 1. Compilation failed in require at /usr/local/lib/perl5/site_perl/5.6.1/ +Net/SSH/Perl/Kex.pm line 6, <GEN0> line 1. BEGIN failed--compilation aborted at /usr/local/lib/perl5/site_perl/5. +6.1/Net/SSH/Perl/Kex.pm line 6, <GEN0> line 1. Compilation failed in require at usr/local/lib/perl5/site_perl/5.6.1/N +et/SSH/Perl/SSH2.pm line 6, <GEN0> line 1. BEGIN failed--compilation aborted at /usr/local/lib/perl5/site_perl/5. +6.1/Net/SSH/Perl/SSH2.pm line 6, <GEN0> line 1. Compilation failed in require at /usr/local/lib/perl5/site_perl/5.6.1/ +Net/SSH/Perl.pm line 51, <GEN0> line 1.

I get this trying to use Net::SSH::Perl. I can reproduce it with this code:

use strict; use Net::SSH::Perl; use UNIVERSAL; # <-- THIS LINE CAUSES THE PROBLEM my $host = 'XXXXXXX'; my %opts = (port => 22, debug => 1, protocol => 2); my $ssh = Net::SSH::Perl->new($host, %opts);
My own code doesn't include that use UNIVERSAL line but if I search what I've installed from CPAN I find a lot of modules that do. If I take that line out, the errors disappear. That seems to be the source of the problem. But I have not found a fix referenced anywhere -- I can't remove all the ones in the CPAN modules I found. Even if I did, I wouldn't be able to upgrade without checking every one I download. This seems like something other monks should have hit somewhere along the line ...

This is Perl 5.6.1 on a Solaris 2.8 platform. I did some limited testing on a 5.8 Perl platform (also Solaris 2.8) and got the same thing. Any help appreciated.

Replies are listed 'Best First'.
Re: Crypt::Random makerandom exports and UNIVERSAL.pm
by PodMaster (Abbot) on Nov 01, 2004 at 08:59 UTC
    A Google search turns up some notes -- enough for me to verify things with a test -- but I'm not sure how to fix things.
    You upgrade UNIVERSAL by hand. See this thread (UNIVERSAL.pm).

    MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
    I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
    ** The third rule of perl club is a statement of fact: pod is sexy.

Re: Crypt::Random makerandom exports and UNIVERSAL.pm
by steves (Curate) on Nov 01, 2004 at 10:06 UTC

    Yes, that did it. Thanks.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://404170]
Approved by Happy-the-monk
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (7)
As of 2024-04-18 17:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found