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

[MacPerl] Mac Toolbox w/ MacPerl



Hello all,

I want to know more about this, but I don't know where to start.  Is this (MacToolbox 
calls from MacPerl) referenced anywhere?  I want to use this stuff!

> OK, another opportunity to show off the Mac toolbox features:
> 
> #!perl
> #
> # Print name of the Machine as defined in Sharing Setup
> #
> use Mac::Resources;
> use Mac::Types;
> use Mac::Memory;
> 
> $res = CurResFile();
> UseResFile(0);
> $name = Get1Resource('STR ', -16413);
> print MacUnpack('STR ', $name->get), "\n";
> UseResFile($res);
> 
> The only non-toolboxish construct in here is MacUnpack, defined in Mac::Types,
> which is used here to translate the Pascal string into a Perl string. Oh
> yes, and $name->get gets the contents of a handle as a data block.

Any help would be greatly appreciated...

-- 
Sincerely,
Anthony Eden
Hurricane Network Manager (via Vienna, Austria)
http://www.hurricane.miami.edu/