Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Delivering "portable" code between POSIX and Windows

by Aristotle (Chancellor)
on May 11, 2003 at 12:11 UTC ( [id://257224]=note: print w/replies, xml ) Need Help??


in reply to Delivering "portable" code between POSIX and Windows

  1. That's less a matter of being digestible by Perl; all Perl constructs except a number of functions geared towards Unix specifics work everywhere. See perlport.
  2. Windows doesn't use the shebang line at all, although perl examines it after launch. You may run into with issues with "too late for -T".
  3. I would suggest you deliver two versions, at least for Windows users: an unbundled one and one built with PAR. The download page should suggest them to get the PAR'd one unless they know why they'd want the other. I don't see a need to write module fetching tutorials for the unbundled package then. Consider wrapping the Windows PAR version in an InstallShield-ish installer - I quite liked the NullSoft installer creator, myself. Due to XS modules, a PAR'd version for people on *nixoid systems would be difficult to offer; you'll need to account for a lot of systems.
  4. I'm not sure what that question means. The quoting mechanisms are very different, at any rate. I'm not sure the MS shells even offer sufficiently powerful escaping mechanisms to deal with arbitrary data. sh type shells do - clumsy ones, but they don't impose restrictions.
  5. I don't think there's anything specific about those. You will have to look into binmode though. (This is a no-op on *nixoid systems, so you don't need to maintain two different versions.) In other notes, remember that MS systems don't pay attention to capitalization in filenames.

Makeshifts last the longest.

  • Comment on Re: Delivering "portable" code between POSIX and Windows

Replies are listed 'Best First'.
Re: Re: Delivering "portable" code between POSIX and Windows
by demerphq (Chancellor) on May 11, 2003 at 19:21 UTC

    2. This can be resolved via creating a second file assocation binding and putting the -T there. Thus *.plt are Taint sensitive perl scripts and .pl are not. (Or whatever.)

    5. binmode isnt a no-op in the *nix world anymore afaiui. Its necessary to open multibyte character files in byte mode.


    ---
    demerphq

    <Elian> And I do take a kind of perverse pleasure in having an OO assembly language...
      The latter was new to me. But then, it's something that was added for the ongoing Unicode support effort which is (historically speaking) relatively new. Thanks for the pointer.

      Makeshifts last the longest.

        It cracks me up a touch. Unix'y types tend to climb on the soapbox about (not) having to binmode, when in fact *nix is pretty much an exception in this regard, and now will have to do it occasionally anyway. lol.


        ---
        demerphq

        <Elian> And I do take a kind of perverse pleasure in having an OO assembly language...

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://257224]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (4)
As of 2024-04-18 04:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found