0

I have a simple Perl script that uses Math::Random.

Is there any way I can distribute the script with Math::Random so users don't have to install it?

(A lot of my users don't have the library installed and don't have root permissions, and probably aren't technical enough to install anything really.)

Everyone will be on AMD 64-bit Linux if that matters.

Greg
  • 45,306
  • 89
  • 231
  • 297
  • How about using the approach described [here](http://stackoverflow.com/questions/542436/how-do-i-include-all-some-of-the-sub-modules-in-a-perl-script?rq=1)? – raina77ow Jun 19 '12 at 13:40
  • That doesn't quite fit, that question was about submodules/poor man's plug-ins, but this question is about bundling. – daxim Jun 19 '12 at 14:42
  • Mightn't something like this be the answer? http://search.cpan.org/~rschupp/PAR-1.005/lib/PAR.pm – Greg Jun 19 '12 at 17:18

1 Answers1

1

Math::Random is an XS module, so you cannot just bundle it in the customary inc directory. The module must be compiled. Since you don't want your users to compile it, you must do it, and ship a package.

Community
  • 1
  • 1
daxim
  • 39,270
  • 4
  • 65
  • 132
  • I'm not quite following. So I download the Math::Random tar.gz file, extract it and compile it. And then there's some result of that which I include with my script? And my script will find that attached piece? – Greg Jun 19 '12 at 17:10