Beefy Boxes and Bandwidth Generously Provided by pair Networks RobOMonk
XP is just a number
 
PerlMonks  

CPAN/MD5 Problem

by adam525 (Initiate)
on Jul 26, 2002 at 15:42 UTC ( #185571=perlquestion: print w/ replies, xml ) Need Help??
adam525 has asked for the wisdom of the Perl Monks concerning the following question:

I have several apps that use MD5. They all give me the same error which is Can't locate object method "new" via package "MD5" (perhaps you forgot to load "MD5"?) when I try to run them. If I try to reinstall MD5 with CPAN I get the same error. Any ideas?

Comment on CPAN/MD5 Problem
Re: CPAN/MD5 Problem
by ichimunki (Priest) on Jul 26, 2002 at 15:51 UTC
    This could be caused by competing installs of perl on the same machine, although you'd think that would fall over on your "use Digest::MD5" statement.

    First thing to check is perl -V and @INC to ensure that the perl you think you're using and the perl your scripts think they're using match-- more to the point: that they have the same lib(rary) tree. If the scripts have #!/usr/bin/local/perl and your path (which would affect perl -V and perl -MCPAN -e "shell") has /usr/bin before /usr/local/bin, you might be installing CPAN modules into a different lib tree than the script's perl is checking for.

Re: CPAN/MD5 Problem
by dws (Chancellor) on Jul 26, 2002 at 16:54 UTC
    I have several apps that use MD5. They all give me the same error which is Can't locate object method "new" via package "MD5"

    Post a small fragement of code that demonstrates the problem. You should be able to do it in 3 lines. This'll rule out simple coding errors.

Re: CPAN/MD5 Problem
by Rex(Wrecks) (Curate) on Jul 26, 2002 at 17:03 UTC
    The newer Digest::MD5 also tries to use Digest::Perl::MD5, you might want to make sure that that module is installed as well. If it is not, it may very well be warning you about the second MD5 package :)

    "Nothing is sure but death and taxes" I say combine the two and its death to all taxes!
Re: CPAN/MD5 Problem
by mitd (Curate) on Jul 28, 2002 at 19:10 UTC
    Quote from MD5.pm module readme:
    This module (MD5.pm) is just a thin wrapper around the Digest::MD5 module. It is provided so that legacy code that rely on the old interface continue to work with the speed benefit of the new module.

    Bottom line Digest::MD5 is now required by MD5.pm if you wish, as you seem to suggest in your question, to use the older (deprecated) MD5.pm.

    As suggested in prior art abandoning MD5.pm and going straight to Digest::MD5 is highy recommended.

    mitd-Made in the Dark
    'Interactive! Paper tape is interactive!
    If you don't believe me I can show you my paper cut scars!'

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (7)
As of 2014-04-18 09:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (465 votes), past polls