What is CamelBones? CamelBones is a two-way bridge between Cocoa and Perl. Write Cocoa apps in Perl, or use Perl as your app's scripting engine.
New in 1.0.1:
Exceptions are bidirectional now. You can catch Perl die() and other
errors using standard Objective-C exception handling.
The PAR module and its prerequisites are included with CamelBones for
10.3 (Panther) and 10.4 (Tiger). (The current PAR module is not compatible
with the Perl included with 10.2) So, you can include .par files in your
applications. Finding the .par modules needs to be done after CamelBones
initializes, so that NSBundle methods can be called to find the .app
bundle, like so:
# main.pl is a good home for this
use CamelBones qw(:All);
my $resDir = NSBundle->mainBundle()->resourcePath();
eval "use PAR '$resDir/*.par'";
To bundle PAR packages into your app, just drag-n-drop them onto your Xcode
project, or choose the "Project/Add to Project..." menu item. Xcode will
add them automatically to the "Copy Resources" phase of your project.
Pure-Perl PARS are easy to create - they're just .zip files renamed to have
a .par extension instead. The directory structure inside of the .par file
must reflect the package name space, i.e. Foo::Bar would be:
XS modules are more work to create; they need to include binary-compatible
versions for *all* of the OS versions you intend to support. Also, note
that XS modules for Tiger (and newer) OS versions will need to be Universal
if your app is to run as a Universal Binary. A tutorial listing the steps I
taok to create the UB modules found in the CamelBones module "kits" is
coming soon on the web site.
Module "kits" are now packaged as .par files, and greatly expanded. A full
list of the included modules is available on the web site, but in short:
DevKit - Modules useful in a variety of problem domains.
DBIKit - DBI, DBD::* drivers for MySQL, PostgreSQL, and SQLite, and
additional DBIx::* modules for database programming.
MacPerlKit - The latest Mac::Carbon.
XMLKit - Many XML::* modules for working with XML.
CatKit - Catalyst, its prerequisites, and many plugins.
The old "RendezvousBrowser" example from the 0.3 series has been updated
to CamelBones 1.0, and renamed to "NetService Browser".
A couple of memory-management bugs were fixed.