I can see Barney's point that the documentation was not in accordance
with the return statements of several of the subroutines.  So I have
changed that accordingly.

It seems from the discussion that most of us can live with an explicit
statement of a true return value (as distinct from an explicit bare
return or an implicit true value), so I have made that change.  No
changes in the test suite are then needed.

These are the return statements:

$ grep -n  return lib/Parrot/Ops2pm/Utils.pm
131:    return bless $argsref, $class;
275:    return 1;
359:    return 1;
414:    return 1;
465:    return 1;
552:    return 1;
637:    return 1;

Attached is the diff for what I have committed in r29553.

For future reference, please note that the POD for
lib/Parrot/Ops2c/Utils.pm has all along included a NOTE ON TESTING
section that describes the accompanying test suite and how to use it in
refactoring the module.

Thank you very much.

kid51



Index: lib/Parrot/Ops2pm/Utils.pm
===================================================================
--- lib/Parrot/Ops2pm/Utils.pm  (revision 29552)
+++ lib/Parrot/Ops2pm/Utils.pm  (working copy)
@@ -375,8 +375,8 @@
 
 =item * Return Value
 
-None.  Internally, sets the C<ops> key of the object's data
-structure.
+Returns true value upon successful completion.  Internally, sets the C<ops>
+key of the object's data structure.
 
 =item * Comment
 
@@ -411,7 +411,7 @@
     @{ $self->{ops}->{OPS} } =
         sort { $a->{CODE} <=> $b->{CODE} } ( @{ $self->{ops}->{OPS} } );
 
-    return;
+    return 1;
 }
 
 =head2 C<prepare_real_ops()>
@@ -429,8 +429,8 @@
 
 =item * Return Value
 
-None.  Internally, sets the C<real_ops> key of the object's
-data structure.
+Returns true value upon successful completion.  Internally, sets the
+C<real_ops> key of the object's data structure.
 
 =item * Comment
 
@@ -462,7 +462,7 @@
     }
     $self->{real_ops} = $real_ops;
 
-    return;
+    return 1;
 }
 
 =head2 C<print_module()>
@@ -476,12 +476,12 @@
 
 =item * Arguments
 
-None.  (Implicitly requires that the constructor have the
-following keys defined:  C<argv>, C<script>, C<moddir> and C<module>.)
+None.  (Implicitly requires that the constructor have the following keys
+defined:  C<argv>, C<script>, C<moddir> and C<module>.)
 
 =item * Return Value
 
-Returns true value upon success.
+Returns true value upon successful completion.  
 
 =item * Comment
 

Reply via email to