On Thu, Jan 8, 2009 at 17:47, root <[email protected]> wrote:
> The following script gives me confusing results.
> I've not delved into OOP before and am surprised when something
> appears to work but gives wrong answers.
> Explicitly Digest::MD5's md5_hex gives wrong answers if called as
> Digest::MD5->md5_hex. OK, I've figured out that it shouldn't be called
> like that after the fact but am surprised that it appeared to work,
> throwing no warnings or errors.
snip
It is giving the right answer. You are asking the wrong question.
Module->method($arg) is roughly equivalent to Module::method('Module',
$arg). What you are seeing is the md5sum of 'Digest::MD5'.
--
Chas. Owens
wonkden.net
The most important skill a programmer can have is the ability to read.
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/