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

Re: [MacPerl] "PerlSlinger"??



Chilton <chilton@tca.net> wrote;

>>Although it seems that a lot of people using MacPerl deploy on Unix, 
>>there are those of us who run 100% Mac operations.  If you're not using 
>>explicit Unixisms (calling "date()" rather than "localtime()" for 
>>example), and there aren't any path dependencies, AND you know about 
>>line-endings Unix v. Mac, you've pretty much got it.  The sorts of things 
>>one uses CGIs for should not have to rely in MacOS Toolbox calls, 
>>AppleEvents, or such-like.  A pure Perl solution should also be a pure 
>>MacPerl solution (with minimal modifications).
>Right, and that's been the case thus far. PerlSlinger uses MacPerl to 
>check everything, and run tests, and so far that's worked great.
>
>>Of course, the Toolbox, AppleEvents, etc is where most of *my* interest 
>>lies at the moment, but I don't currently use Perl for CGIs (no 
>>particular reason, if you ask).
>See, this is where I'm most interested right now, too. I'm just not 
>finding the time to do much research. As soon as I do, I'll probably make 
>a RAD tool for creating sw with MacPerl.

For starters on portability, try testing the contents of "$^O".  This give the OS your port of Perl is running under (pretty basic stuff actually).

#!perl

print ("Operating System: $^O \n", "Perl Version: $]")

which outputs, under MacPerl (5.2.0r4):

Operating System: MacOS
Perl Version: 5.004

Also, knowing that CGIs make extensive use of %ENV, (and referencing pg 236 of MPPE)

#!perl -w
my($key);

print "Content-type: text/plain\n\n";
foreach $key (keys(%ENV))  {
    print "$key => $ENV{$key} \n";
}

which give me the output:

Content-type: text/plain

TMPDIR => MyrmiDonna:Temporary Items:
MACPERL => MyrmiDonna:Applications:Development_Tools:MacPerl Ä: 
PERL5LIB => MyrmiDonna:Applications:Development_Tools:MacPerl Ä:lib 
USER => Brian McNett 

YMMV, obviously.  What follows in MPPE is a discussion of CGI.pm.  As far as I can tell the only part of CGI.pm that isn't supported under MacPerl is the file upload feature, which could be modified to work (according to MPPE (at least at the time it was written)).

--Brian

# Fungal Parataxonomy                   Mycology Information (Mycoinfo)
# Webmaster, Staff Writer      **The World's First Mycology E-Journal**   
# <mailto:webmaster@mycoinfo.com>            <http://www.mycoinfo.com/> 
# "A couple of guys trying to do something great..."



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch