There is App::fatpacker, which will inline all (pure Perl) modules into your script, so even you can use lots of CPAN.
| [reply] |
Thank you for that information.
I was going to look into that anyway, so I appreciate the preemptive help.
Do you know how bombproof fatpacker is? Is there a danger of my variables clashing with those of the module or any other issues? If I could use it to inline Spreadsheet::WriteExcel, I could make the script totally self-contained, which would make my life a lot eaeier.
| [reply] |
I didn't post a module, I posted a script
There's no difference.
I'd have to tell users to install the module
You already are having them install one.
the important difference being that I can integrate this script into a bigger perl script
So the real limitation is that you don't want to have two files. That's fine. Can't help you there short of combining the two modules/scripts into one. That's probably still less work then reimplementing existing work, though.
| [reply] |
There's no difference (between a module and a script).
Well, there is arguably no major philosophical difference between the two, but there is a rather significant practical one, or you know something that I don't.
You already are having them install one.
How so? You haven't seen the script in question so I'm not sure how you think you can know that. If you mean Spreadsheet::WriteExcel, I have taken that feature out of the module-less version of the script, because... well, it's a module-less version and it's a non-essential comfort feature. I hope to be able to integrate it, so if you or anyone else has a suggestion, I'm listening. I tried fatpacker, it failed on the fatpack file command with the following error:
Can't stat folder/fatpack/lib: No such file or directory
at /usr/local/share/perl/5.10.0/App/FatPacker.pm line 161
BEGIN failed--compilation aborted at /usr/local/bin/fatpack line 3.
Also, it doesn't seem to pick up Spreadhseet::WriteExcel, it only tries to integrate the two HTML modules I need. Perhaps I'll start a separate thread on the issue.
Re: the "you want less files" assertion, no. Not at all. I don't care how many files the project is made up of. All I want is to make it self-contained. I want the user to be able to download my package, double click the file that says "double click me" and have it work. No "go to the console and type cpan, install this and that and then troubleshoot arcane error messages for two hours to find out why the module won't install on your computer". Nobody goes through all that, except us geeks.
I think I saw someone on here mention a manual method of integrating modules into their project so that users don't have to install them separately. Given that App::Fatpacker doesn't seem to work for me, I would be interested in any pointers on that.
| [reply] [d/l] |