Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re^2: RFC: A Primer on Writing Portable Perl Programs

by Anonymous Monk
on Nov 02, 2006 at 16:18 UTC ( #581913=note: print w/replies, xml ) Need Help??

in reply to Re: RFC: A Primer on Writing Portable Perl Programs
in thread RFC: A Primer on Writing Portable Perl Programs

You say to avoid using $^O, but then recommend using File::Spec, which uses $^O to do what you said not to do.

His advice was directed at the user of the File::Spec module, not the author of the File::Spec module. If the File::Spec module is any good (as I understand it is), the end user can simply use it without knowing exactly how it works.

It's only when a module doesn't work (in the way you want it to) that you're reduced to groveling through the tedious little implementation details to fix whatever's broken.

At some point you do have to get down to brass tacks and interact with the operating system, or tell Perl how to behave for the particular operating system.

"Avoid <X>" doesn't mean "don't do <X>". It means "don't do <X> if there's another way of doing things". If there's no other way of doing things, his advice (and your criticism) doesn't apply.

  • Comment on Re^2: RFC: A Primer on Writing Portable Perl Programs

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://581913]
[Corion]: I stay home today as preventative measure to not really get a cold. On the upside, I can sit on the balcony in the sun, and it isn't that cold, at least once I don a thick coat :)
[marto]: you have a balcony on the Sun?
marto ducks

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2018-03-21 11:08 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (267 votes). Check out past polls.