I'd really appreciate some help with making my perl script into a Windows executable.
Background: I've contracted to create a screen-scraper for a client. The client is remote and not remotely knowledgeable about perl, although he has installed ActiveState on his PC successfully. I'm not creating an executable for any reason other than to make it easier for him. If he lived around the corner I'd go there and install all the necessary modules and give him a script.
The script is a scraper, and uses WWW::Mechanize and HTML::TableExtract.
My script is ready and works on my Mac and a Win2K PC. On that Win2K PC I've created an executable version with Audrey Tang's pp utility.
I've had some success with this approach before and no complaints. But the only module my success story uses is LWP::UserAgent.
Problem: He's downloaded the executable and tried it on two PCs.
- One PC with unknown OS and no Perl, it doesn't run at all, or rather he gets a command-prompt window with no output and nothing happens.
- Windows 98 PC with ActiveState Perl installed, it runs but it quits with no error message as soon as it tries to open and write to a file. The file is created but has no content.
Questions:
- Should executables created with pp work on any version of Windows?
- Am I right in thinking that just by my having use WWW::Mechanise in the script, it will pick up on dependencies? Because I've tried it with different options including the ones which say they run or check the script to find all dependent modules, and the files they produce seem identical.
- The default settings of pp include a perl interpreter, right? So why did the script work on the computer where he has Perl and not on the vanilla one?
- Any idea why it would die, but without a proper die() message when trying to print to a filehandle? Anything special about Windows here? Although my other project does exactly that with no problems.
- Is it possible that the inclusion of more complex modules which rely on HTML Parsers and the like has caused problems which weren't evident in the other project?
- Where is the interpreter in the file? I'm searching through it (it's really just a ZIP file with lots of Perl magic, right?) and I can't see it.
- What's my best option at this point for turning my perfectly good script into a Window EXE?
($_='kkvvttuu bbooppuuiiffss qqffssmm iibbddllffss')
=~y~b-v~a-z~s; print
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.