[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Find SMTP server(s): nslookup?




Chris Nandor wrote:

> While perlport is a good reference, it is not very complete in respect to
> $^O values.  Perhaps it could be, though.

In two different respects.  One would be to try to catalog the cacophony of 
different (unix) $^O values in perlport.  Another approach would be to have 
perl do what tcl now does with a global variable that returns a generic 
'UNIX' 'MAC' or 'WIN'.  I do not recall the name of the tcl variable nor 
do I recall what the exact return values are, but the idea is to have 
something into which broad categories of OS/filesystem code code be 
important.  Thus I could write:

    if ($^OS_CATEGORY eq 'Unix') {
        # Unix code
    }

rather than the unweildly:

    if ($^O eq 'aix' || $^O eq 'dec_osf' || ...) {
        # Unix code
    }

or the more likely:

    {
        # Unix code
    } unless ($^O eq 'MacOS' || $^O eq 'Win32');

I know where this would be better discussed (I also have some tweaks to 
perlport independent of this proposal that I'll send to p5p anyway).

Peter Prymmer


===== Want to unsubscribe from this list?
===== Send mail with body "unsubscribe" to macperl-request@macperl.org