http://qs321.pair.com?node_id=257211

I've been building a perl 'application' for several months now, which has grown to require about 15 separate modules (and may require several more before I'm done). I mainly develop on Linux/BSD systems, not Windows. A good majority of the users of this application will likely be Windows users, based on our download statistics from the main project website that this application will become a part of. So far, so good... except I have a few questions about the 'linting' and 'delivery' approach:
  1. What considerations should I take to make sure that code that runs clean (with strict, warnings, diagnostics, -T) on POSIX systems will continue to run clean on Windows systems?
  2. Is there any change to @INC or the shebang between these systems I should worry about?
  3. When delivering the application itself, should I also bundle the required modules that it uses? Or should I add a snippet to the README that describes how to use PAR or PPM/CPAN to fetch and install these modules? I don't want to get bogged down in having to teach everyone how to use PPM or CPAN because they got some error or another with this, so I'd prefer it to be as clean as possible. This will also affect the POSIX (mostly Linux) users when installing these modules, which have quite a few requirements of their own, like XML::LibXML and others.
  4. What about using the modules as "local packages" under the application directory itself? (this code is not a module in itself, yet..)
  5. What rules change as far as error trapping/reporting, that can be abstracted into something portable between systems? i.e. how would cmd.exe (NT/XP) vs. command.com (98/ME) vs. /bin/sh differ in their interpolation in this regard?
  6. What about operations like open(), sysread(), and system()? Do they need specific "precautions" as well when run on Windows?

One of the thoughts I had was to write a quick script (batch/cmd file on Windows, shell script on POSIX, or maybe just a pure perl script itelf, which can detect the OS in place, and perform accordingly) which then can unpack the modules delivered with my application, push them into the right place, and so on, but that has its gotchas also.

I'm used to writing portable code across POSIX systems (Unix, BSD, Linux, Solaris, etc.) in C, but not with perl, and I know there are many more things to look out for.

Any insight from those who have done this? I'm specifically looking for options, alternatives, gotchas, and other means of accomplishing the task. Most of the modules are low-level XML, HTML, IO modules wrapped around some code that is doing a lot of text processing.