Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^2: Seeking good ways to structure cross-platform code

by Roger (Parson)
on Sep 29, 2004 at 07:17 UTC ( [id://394877]=note: print w/replies, xml ) Need Help??


in reply to Re: Seeking good ways to structure cross-platform code
in thread Seeking good ways to structure cross-platform code

I like Corion's approach, in fact I use a similar approach as well. I think this approach is cleaner than mixing codes for different platforms into a single module.

My similar approach:

package My::Functions; ... my $OS_TYPE = ...; eval "require My::Functions::$OS_TYPE" or die "Can not load module"; ..


Having said that, simon's approach from File::Spec is nice too. As Perl programmers always quote: there is more than one way to do it. :-)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://394877]
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: (3)
As of 2024-04-25 08:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found