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

Re: [MacPerl] Using ' instead of :: as the package separator



Ken Williams, <ken@forum.swarthmore.edu> wrote:

>You mean the stuff at the top?  Absolutely, it scared the shit out of me.  
>Why do we need the "YOU HAVE BEEN WARNED" text?  Couldn't we just warn 
people? 
>Without trying to actually *scare* them?  

Okay, it's at the bottom of the POD, that **can** be at the top of the 
module ;-)

This USED to scare me too, until I discovered the ONLINE version of 
Inside Macintosh.  If you don't know how certain toolbox routines work, 
you READ THE ONLINE DOCCUMENTATION.  View the "warning" as a "challenge" 
to know you Mac Toolbox better, and watch how your perspective changes!

Visit  http://developer.apple.com/  

Also, as an aside, this warning is generated by the code used to BUILD 
the modules, and gets placed there by default.  I've used that same code 
to build non-toolbox XS modules, and had to pull the warning out or alter 
it because it wasn't appropriate.

The main reason for the warning, is that the toolbox modules are being 
executed OUTSIDE the "safe" environs of MacPerl.  "Fatal" toolbox errors 
may drop you into MacBugs (if you have it installed), or otherwise give 
you an error condition not trapable by Perl.  The program doesn't "die" 
in such conditions, but rather the entire Macintosh hangs (unless you've 
got MacBugs).  For stuff as well used as Mac::StandardFile, there are 
enough EXAMPLES out there, that everyone should know how to use it 
correctly.  Non-fatal errors **can** and should be trapped using $^E, a 
fact that frequent readers of this list should be very well aware.

> I found it rather elitist too, actually.  There are hardly any docs 
distributed
> with the modules, and there's a big sign posted in them that says I'll 
> screw up my computer if I try to use them.  No, thanks.  I program for
> recreation, but this doesn't sound like much fun.

I respecfully disagree on both counts.  No, it's not elitist to ask Mac 
programmers to read Inside Macintosh, and no there ISN'T "hardly any" 
docs distributed with the modules.  The PODs for all the Toolbox modules 
are THERE, and they make perfect sense in the context that they are 
intended to be used.  Admittedly, the beginner needs POINTERS on where to 
FIND Inside Macintosh, and the tools for integrating the Mac Toolbox pods 
into SHUCK should be included in the MacPerl distribution.

>Right - when I ventured into MacPerl land and saw that these Perl4isms were
>still being used here, I thought I'd stepped back into the '60s.  =)

I never used StandardFile.pl, and am mystified why anyone would.  The 
'modern' method gives access to much more functionalty (and 
StandardFile.pl these days is mostly just a wrapper for the real deal 
anyway).  Also my exposure to Perl4 was minimal at best.  I had a copy on 
my Mac Classic (which can't run Perl5), which I never really used.

--B


Brian McNett, Webmaster
*************************************************************
Mycoinfo. The world's first mycology e-journal.
http://www.mycoinfo.com/
*************************************************************


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