Subject: | Test errors on Leopard |
I tried to install this (I'm using 10.5) and I got the following test
errors:
t/10.readxml..........1/12 Can't locate object method "class" via
package "NSCFDate" (perhaps you forgot to load "NSCFDate"?) at
/Users/david/.cpan/build/Mac-Tie-PList-0.01-5O5uN8/blib/lib/Mac/Tie/PList.pm
line 92.
It looks like Apple moved the definition of NSCFDate to CoreFoundation
and hid it behind some underscores. I'm attaching a patch that got the
tests to pass for me.
Subject: | Mac::Tie::PList::Scalar-leopard.patch |
--- a/lib/Mac/Tie/PList.pm 2006-02-05 22:01:53.000000000 -0800
+++ b/lib/Mac/Tie/PList.pm 2008-12-08 03:15:56.000000000 -0800
@@ -48,6 +48,7 @@
use warnings;
use Carp;
use Foundation;
+use CoreFoundation;
use File::Temp qw(tempfile);
=item my $hash_ref = Mac::Tie::PList->new($data)
@@ -95,7 +96,7 @@
($plist_obj->isKindOfClass_(NSCFNumber->class)) ||
($plist_obj->isKindOfClass_(NSCFBoolean->class)) ||
($plist_obj->isKindOfClass_(NSCFData->class)) ||
- ($plist_obj->isKindOfClass_(NSCFDate->class)) ||
+ ($plist_obj->isKindOfClass_(__NSCFDate->class)) ||
($plist_obj->isKindOfClass_(NSCFString->class))
) {
tie my $plist, 'Mac::Tie::PList::Scalar', $plist_obj;