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

Re: [MacPerl] beginner needs book recommendation and advice




Chris Nandor wrote Tue, 2 Mar 1999:

> At 16.10 -0500 1999.03.02, Andy Berkvam wrote:
> >On Tue, 2 Mar 1999, Paul J. Schinder wrote:
> >
> >> (One word of warning: since these books are written by Unix users,
> >> some of the examples won't work as is under MacPerl.)
> >>
> >  I just found out about the Perl Power Tools project.  To quote the web
> >page, "Our goal is quite simply to reimplement the classic Unix command
> >set in pure Perl, and to have as much fun as we can doing so."  Looks like
> >this project will allow most "backticked" commands to work on most (all?)
> >platforms that perl can run on, including Macs.  Find more info at
> ><http://language.perl.com/ppt/>.
> 
> Well, with some serious modifications, in some cases.  Make no mistake,
> these programs will be command line programs meant to be run in a shell and
> sometimes a terminal app or console.  Some will even call out to other
> programs (like awk, which calls a2p, the awk to perl translator).

One of the submisssions (currently known as wc.pvhp <- but I warn you
that that one on Tom's site has known bugs on the Mac) had provision for 
use on the Mac.

It was intended to be a perl replacement for wc and when I had saved it
as a droplet and dropped files - it worked great, but what if I wanted
the power to specify only -l or only -w or somesuch?  Toward that end I
added a call to MacPerl::Pick for selecting options, whereby I messed
up the MPW MacPerl user who wanted to be able to say

   wc -l filename

on the command line.  What to do?  Well perlport.pod mentions:

   if ($MacPerl::Version =~ /App/) { }

Unfortunately $MacPerl::Version is only gonna be set on a Mac.  Elsewhere
I do not presume to tweak a package called MacPerl::.

My current strategy would be to leave the @ARGV switch handling as is
and perhaps leave the MacPerl::Pick() code in but commented out to avoid
-w -Mstrict hassles.  This would mean that it'd work fine under MPW MacPerl
but a regular app user would need to tweak the code :-(

Note that they're pretty particular, e.g. Getopt::* is being deprecated 
in the PPT project.

What should one do in this case?  Perhaps re-release PPT for Mac with 
various CLI-switch -> MacPerl-GUI tweaks?

Peter Prymmer



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