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.

In reply to Problem with Math::BigInt::Named by blazar

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.