----- "Sherm Pendley" <[EMAIL PROTECTED]> wrote: > On Dec 14, 2007 11:07 AM, Tom Yarrish <[EMAIL PROTECTED]> wrote:
> Oddly, there's not a whole lot of actual Perl code in it, although > what's > there is kind of obscure. Autoload is used to catch method calls that > aren't > implemented in Perl, and send them across the bridge, tied arrays and > hashes > to implement the Perl side of "toll free" bridging, and attributes are > used > to declare method signatures. > > Of course, there's a good amount of XS programming involved. You'd > need to > know your way around the perlembed, perlguts, and perlapi docs. > > And you'd definitely need to know your way around Cocoa, and the > Objective-C > runtime functions. Perl classes are registered with the ObjC runtime, > and > participate directly in the inheritance hierarchy; the key difference > with > such classes is that their selectors all share the same IMP (aka > implementation function), which uses Perl's internal API (i.e. > perldoc > perlapi) to reflect the call to Perl. The ObjC runtime is also used to > get a > list of registered classes at startup, after which libperl functions > are > used to create all the packages and @ISA arrays that are needed for > the > autoloading to work when Cocoa methods are called from Perl. > > On the Cocoa side, there are NSArray and NSDictionary subclasses > whose > primitive functions use libperl functions to access Perl's arrays and > hashes, respectively. To deal with that, you'd need to understand how > Cocoa's class clusters work, and how to add a new concrete subclass to > them. > > sherm-- Why not put a post up on use.perl.org or Perlbuzz? There are plenty of Perl people out there that use/have experience with Macs. Tom -- -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (Darwin) iD8DBQFHXgrFZWzkfeDiTw4RAozoAKCMRphwyM/wT9AbB+PMX68FUN8nEgCfX7Nu n7B9YcXwARSuuLdfbmznm/k= =5/ey -----END PGP SIGNATURE-----