blazar has asked for the wisdom of the Perl Monks concerning the following question:
I've been searching a module to spell out numbers: it's been somewhat difficult (this is the subject of another question) but after some tries I found Math::BigInt::Named, although I didn't really needed something suited for big integers... However I installed it (under ActivePerl on a Windows system, with ppm - module version 0.03) but now I have problems with it. Namely:
C:\temp>perl -MMath::BigInt::Named -e "Math::BigInt::Named->new(42)" Can't locate object method "new" via package "Math::BigInt::Named" at +-e line 1. C:\temp>perl -MMath::BigInt::Named -e "Math::BigInt::Named->name(42)" Can't locate object method "new" via package "Math::BigInt::Named" at +C:/Program mi/Perl/site/lib/Math/BigInt/Named.pm line 41.
Giving a peek into the module's source, it clearly inherits from Math::BigInt, so M::BI's new() should be called. Or when one tries directly with name(), then Math::BigInt::Named::English's new() (or whatever language's) is called. But the latter also inherits from M::BI::N and thus M::BI, and does not define its own new(). OTOH if I use M::BI::N::E directly, I get:
C:\temp>perl -MMath::BigInt::Named::English -e "Math::BigInt::Named::E +nglish->ne w(42)" Can't locate object method "new" via package "Math::BigInt::Named::Eng +lish" at - e line 1. C:\temp>perl -MMath::BigInt::Named::English -e "Math::BigInt::Named::E +nglish->na me(42)" Can't locate object method "new" via package "Math::BigInt" at C:/Prog +rammi/Perl /site/lib/Math/BigInt/Named/English.pm line 15.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Problem with Math::BigInt::Named
by syphilis (Archbishop) on Aug 28, 2007 at 11:44 UTC | |
by blazar (Canon) on Aug 28, 2007 at 13:41 UTC | |
|
Re: Problem with Math::BigInt::Named (luke)
by tye (Sage) on Aug 28, 2007 at 13:41 UTC | |
by blazar (Canon) on Aug 28, 2007 at 14:03 UTC |