in reply to CPAN module for prime factors of a number

Have you seen Math::Pari::factorint?


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"I'd rather go naked than blow up my ass"

Replies are listed 'Best First'.
Re^2: CPAN module for prime factors of a number
by spx2 (Deacon) on Dec 18, 2009 at 13:19 UTC
    I would use that, but I want to use it as a dependency for a module that will go on CPAN. How does CPAN cope with external dependencies such as pari/gp because Math::Pari is only an interface to pari/gp which needs to be installed. Looking forward to your oppinion about this , thanks :)

      If you install Math::Pari using the cpan shell, it offers to fetch and build Pari/GP for you. That's no guarentee the build will succeed--it fails on my Win64 system--but should work most places I think.


      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.

      Twice in one day, still not getting the hang of reading the documentation I see :) It's a good habit that will save you time.

      Math::Pari is only an interface to pari/gp which needs to be installed

      All you need do is install the Math::Pari module. To do that, you will need to grab the pari source, but you don't have to build GP/PARI - see the instructions at http://cpansearch.perl.org/src/ILYAZ/Math-Pari-2.01080603/INSTALL.

      Last time I tried, Math::Pari wouldn't build with the pari-2.3.4 source, so (I think) I used the pari-2.1.7 source, which was fine. Perhaps that has changed with latest Math::Pari releases - last version I built was 2.010800.

      Cheers,
      Rob