What's New in 0.2.3
Introduction
Not a whole lot new this time around. Really, this release could have waited until later, except that one person wrote to me and said he had a "a heap" of apps that needed one particular feature.
-
Threads
Threads in Perl are a bit of a moving target. But, CamelBones now has basic support for them. If it detects a threading-enabled Perl - which includes the default 5.8.1 shipped with Panther, but not the 5.6.0 release in Jaguar - it automatically uses the Threads.pm module before running any other code.
As stated in the Threads.pm docs, the module needs to be loaded as early as possible, and cannot be loaded from within an eval(). Essentially all of the code in a CamelBones app is running inside of an eval(), so simply adding "use Threads;" in app code was insufficient. What happens now is that the equivalent of the "-MThreads" command-line option is used when starting the Perl interpreter, so that the module is loaded early and outside of the eval().
Note that the use of Cocoa objects outside of the main thread has not been extensively tested and isn't recommended in production code for that reason.
-
Arbitrary method names
The names of methods exported from Perl to Objective-C no longer need to resemble the selectors they respond to. For example, where you would previously have declared a method like this:
sub doFoo_withBar_andBaz : Selector(doFoo:withBar:andBaz:) { ... }Now you can give the method a short name that you can use when calling the method from perl, like this:
sub doFoo : Selector(doFoo:withBar:andBaz:) { ... } -
Trailing underscores
The use of trailing underscores when calling Cocoa methods is now supported. This can be useful if you have code that needs to run under both CamelBones and Apple's PerlObjCBridge, since the latter requires it.
-
"Fat Camel" package
"Fat Camel" is a new packaging option that includes, in addition to everything found in the standard Developer package, the latest Perl and several useful CPAN modules.
