Add each_value to scalar. Also add tests for the behaviour of setting both $_ and...
[gitmo/Moose-Autobox.git] / lib / Moose / Autobox / Scalar.pm
index 6ebb9fe..d7555a9 100644 (file)
@@ -11,6 +11,8 @@ sub first { $_[0] }
 sub last  { $_[0] }
 sub print { CORE::print $_[0] }
 sub say   { CORE::print $_[0], "\n" }
+sub each_value { $_[1]->($_ = $_[0]) }
+
 1;
 
 __END__
@@ -55,6 +57,10 @@ As per flatten.
 
 As per flatten.
 
+=item B<each_value>
+
+As per flatten.
+
 =head1 BUGS
 
 All complex software has bugs lurking in it, and this module is no