From: Christopher H. Laco Date: Wed, 28 Dec 2011 20:37:01 +0000 (-0500) Subject: Silence warnings resulting from incomplete can() overrides hiding X-Git-Tag: v0.10006^0 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2FClass-Accessor-Grouped.git;a=commitdiff_plain;h=ad0ed975f7023237ac91802e5da9ab4f30c7661d Silence warnings resulting from incomplete can() overrides hiding get/set_simple methods Update version for release --- diff --git a/Changes b/Changes index c36cedb..b2fa5ee 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,9 @@ Revision history for Class::Accessor::Grouped. +0.10006 2011-12-30 03:52 (UTC) + - Silence warnings resulting from incomplete can() overrides + hiding get/set_simple methods + 0.10005 2011-12-26 12:43 (UTC) - Depend on newer bugfixed Class::XSAccessor - Repack with correct metadata (RT#73100) diff --git a/lib/Class/Accessor/Grouped.pm b/lib/Class/Accessor/Grouped.pm index 1f5686d..b9f2bf1 100644 --- a/lib/Class/Accessor/Grouped.pm +++ b/lib/Class/Accessor/Grouped.pm @@ -13,7 +13,7 @@ BEGIN { } } -our $VERSION = '0.10005'; +our $VERSION = '0.10006'; $VERSION = eval $VERSION if $VERSION =~ /_/; # numify for warning-free dev releases # when changing minimum version don't forget to adjust Makefile.PL as well @@ -682,9 +682,9 @@ $gen_accessor = sub { # this block over and over again my $resolved_implementation = $cached_implementation->{$current_class} || do { if ( - $current_class->can('get_simple') == $original_simple_getter + ($current_class->can('get_simple')||0) == $original_simple_getter && - $current_class->can('set_simple') == $original_simple_setter + ($current_class->can('set_simple')||0) == $original_simple_setter ) { # nothing has changed, might as well use the XS crefs # @@ -726,7 +726,7 @@ $gen_accessor = sub { # if after this shim was created someone wrapped it with an 'around', # we can not blindly reinstall the method slot - we will destroy the # wrapper. Silently chain execution further... - if ( !$expected_cref or $expected_cref != $current_class->can($methname) ) { + if ( !$expected_cref or $expected_cref != ($current_class->can($methname)||0) ) { # there is no point in re-determining it on every subsequent call, # just store for future reference