in reply to Re^3: Troubleshooting a character reference converter script
in thread Troubleshooting a character reference converter script

I don't believe that because you posted a module you intend to install.

Excuse me?
Do you think I'm lying about trivial things like this for no reason?

I didn't post a module, I posted a script - the important difference being that I can integrate this script into a bigger perl script I'm writing by simply putting it in a sub, and users can just run my script and not worry about how it converts HTML to txt. If I were to use a module, I'd have to tell users to install the module (utterly unrealistic in the case of most users) or package the whole thing up with PAR::Packer, which can break quite easily. BTW the original solution I used was HTML::Entities and HTML::Strip, then packaging the whole thing with PAR::Packer. But then I realized that an executable made with PAR::Packer on Ubuntu 9.x may not run on 8.x and an OS X Snow Leopard executable may not run on Leopard or Tiger... so here I am rewriting the HTML converter for compatibility, and here you are not believing it all for some mysterious reason.
  • Comment on Re^4: Troubleshooting a character reference converter script

Replies are listed 'Best First'.
Re^5: Troubleshooting a character reference converter script
by Corion (Patriarch) on Oct 28, 2010 at 11:16 UTC

    There is App::fatpacker, which will inline all (pure Perl) modules into your script, so even you can use lots of CPAN.

      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.
Re^5: Troubleshooting a character reference converter script
by ikegami (Patriarch) on Oct 29, 2010 at 20:06 UTC

    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.

      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.