From: Christopher H. Laco Date: Mon, 26 Jun 2006 23:32:37 +0000 (+0000) Subject: Added return statement to the end of get_inherited to return undef as a last resort X-Git-Tag: v0.04000~4 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c46050d3590413eba374e98a3789b2675c2bbca1;p=p5sagit%2FClass-Accessor-Grouped.git Added return statement to the end of get_inherited to return undef as a last resort --- diff --git a/Changes b/Changes index 9888a97..ace89df 100644 --- a/Changes +++ b/Changes @@ -1,4 +1,7 @@ Revision history for Class::Accessor::Grouped. +0.02 2006-06-26 19:23:13 + - Added return statement to end of get_inherited + 0.01 2006-06-26 17:38:23 - initial release diff --git a/lib/Class/Accessor/Grouped.pm b/lib/Class/Accessor/Grouped.pm index 7724989..f4a81f8 100644 --- a/lib/Class/Accessor/Grouped.pm +++ b/lib/Class/Accessor/Grouped.pm @@ -6,7 +6,7 @@ use Class::ISA; use Scalar::Util qw/blessed reftype/; use vars qw($VERSION); -$VERSION = '0.01'; +$VERSION = '0.02'; =head1 NAME @@ -305,6 +305,8 @@ sub get_inherited { foreach (@supers) { return ${$_.'::_'.$get} if defined(${$_.'::_'.$get}); }; + + return; } =head2 set_inherited diff --git a/t/inherited.t b/t/inherited.t index dedcc15..43f5b6e 100644 --- a/t/inherited.t +++ b/t/inherited.t @@ -1,4 +1,4 @@ -use Test::More tests => 32; +use Test::More tests => 33; use strict; use warnings; use lib 't/lib'; @@ -75,3 +75,4 @@ BaseInheritedGroups->basefield('base'); SuperInheritedGroups->basefield(undef); is(SuperInheritedGroups->basefield, 'base'); +is(BaseInheritedGroups->undefined, undef); diff --git a/t/lib/BaseInheritedGroups.pm b/t/lib/BaseInheritedGroups.pm index 1f63f0f..23f3ff8 100644 --- a/t/lib/BaseInheritedGroups.pm +++ b/t/lib/BaseInheritedGroups.pm @@ -3,7 +3,7 @@ use strict; use warnings; use base 'Class::Accessor::Grouped'; -__PACKAGE__->mk_group_accessors('inherited', 'basefield'); +__PACKAGE__->mk_group_accessors('inherited', 'basefield', 'undefined'); sub new { return bless {}, shift;