From: Peter Rabbitson Date: Sun, 28 Oct 2012 11:19:12 +0000 (+0100) Subject: Excise most redundant explicit return() ops X-Git-Tag: v0.10007~12 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=cf8d4321fdb5dcff6a197c0542a0d9b5f82fe3a3;p=p5sagit%2FClass-Accessor-Grouped.git Excise most redundant explicit return() ops --- diff --git a/lib/Class/Accessor/Grouped.pm b/lib/Class/Accessor/Grouped.pm index 46900db..3b17e5e 100644 --- a/lib/Class/Accessor/Grouped.pm +++ b/lib/Class/Accessor/Grouped.pm @@ -222,7 +222,7 @@ name passed as an argument. =cut sub get_simple { - return $_[0]->{$_[1]}; + $_[0]->{$_[1]}; } =head2 set_simple @@ -241,7 +241,7 @@ for the field name passed as an argument. =cut sub set_simple { - return $_[0]->{$_[1]} = $_[2]; + $_[0]->{$_[1]} = $_[2]; } @@ -317,11 +317,10 @@ sub set_inherited { } else { Carp::croak('Cannot set inherited value on an object instance that is not hash-based'); }; - } else { - no strict 'refs'; + } - return ${$_[0].'::__cag_'.$_[1]} = $_[2]; - }; + no strict 'refs'; + ${$_[0].'::__cag_'.$_[1]} = $_[2]; } =head2 get_component_class @@ -346,7 +345,7 @@ Gets the value of the specified component class. =cut sub get_component_class { - return $_[0]->get_inherited($_[1]); + $_[0]->get_inherited($_[1]); }; =head2 set_component_class @@ -391,7 +390,7 @@ sub set_component_class { } }; - return $_[0]->set_inherited($_[1], $_[2]); + $_[0]->set_inherited($_[1], $_[2]); }; =head1 INTERNAL METHODS