[Bast-commits] r3564 - in trunk/Class-Accessor-Grouped: .
lib/Class/Accessor t
matthewt at dev.catalyst.perl.org
matthewt at dev.catalyst.perl.org
Tue Jul 3 02:10:24 GMT 2007
Author: matthewt
Date: 2007-07-03 02:10:23 +0100 (Tue, 03 Jul 2007)
New Revision: 3564
Modified:
trunk/Class-Accessor-Grouped/Changes
trunk/Class-Accessor-Grouped/lib/Class/Accessor/Grouped.pm
trunk/Class-Accessor-Grouped/t/inherited.t
Log:
fixes for CDI/CDA compat
Modified: trunk/Class-Accessor-Grouped/Changes
===================================================================
--- trunk/Class-Accessor-Grouped/Changes 2007-07-02 15:24:29 UTC (rev 3563)
+++ trunk/Class-Accessor-Grouped/Changes 2007-07-03 01:10:23 UTC (rev 3564)
@@ -1,5 +1,8 @@
Revision history for Class::Accessor::Grouped.
+ - Altered get_inherited to return undef rather than () when no value
+ set for Class::Data::(Inheritable|Accessor) compatiblity
+
0.06001
- Fixed spelling test error
- Added WriteAll/DIST/PREOP for README
Modified: trunk/Class-Accessor-Grouped/lib/Class/Accessor/Grouped.pm
===================================================================
--- trunk/Class-Accessor-Grouped/lib/Class/Accessor/Grouped.pm 2007-07-02 15:24:29 UTC (rev 3563)
+++ trunk/Class-Accessor-Grouped/lib/Class/Accessor/Grouped.pm 2007-07-03 01:10:23 UTC (rev 3564)
@@ -318,7 +318,7 @@
return ${$_.'::__cag_'.$get} if defined(${$_.'::__cag_'.$get});
};
- return;
+ return undef;
}
=head2 set_inherited
Modified: trunk/Class-Accessor-Grouped/t/inherited.t
===================================================================
--- trunk/Class-Accessor-Grouped/t/inherited.t 2007-07-02 15:24:29 UTC (rev 3563)
+++ trunk/Class-Accessor-Grouped/t/inherited.t 2007-07-03 01:10:23 UTC (rev 3564)
@@ -1,4 +1,4 @@
-use Test::More tests => 33;
+use Test::More tests => 35;
use strict;
use warnings;
use lib 't/lib';
@@ -8,6 +8,11 @@
my $super = SuperInheritedGroups->new;
my $base = BaseInheritedGroups->new;
+my @ret = SuperInheritedGroups->basefield;
+
+ok(@ret == 1, 'Return value before set');
+ok(!defined(SuperInheritedGroups->basefield), 'Undef return before set');
+
# set base. base, super, object = base
is(BaseInheritedGroups->basefield('All Your Base'), 'All Your Base');
is(SuperInheritedGroups->basefield, 'All Your Base');
More information about the Bast-commits
mailing list