]> git.vpit.fr Git - perl/modules/Sub-Nary.git/blobdiff - lib/Sub/Nary.pm
Make sure the POD headings are linkable
[perl/modules/Sub-Nary.git] / lib / Sub / Nary.pm
index a90787ba2b96c3d1a0bfbea93164b41991e2bc6b..4b87e45bc779c0fd4a9c9a3e110b2816c95b8a1b 100644 (file)
@@ -28,7 +28,7 @@ BEGIN {
 
     use Sub::Nary;
 
-    my $sn = Sub::Nary->new();
+    my $sn = Sub::Nary->new;
     my $r  = $sn->nary(\&hlagh);
 
 =head1 DESCRIPTION
@@ -39,11 +39,15 @@ This module uses the L<B> framework to walk into subroutines and try to guess ho
 
 =head2 C<new>
 
+    my $sn = Sub::Nary->new;
+
 The usual constructor. Currently takes no argument.
 
-=head2 C<nary $coderef>
+=head2 C<nary>
+
+    my $res = $sn->nary($coderef);
 
-Takes a code reference to a named or anonymous subroutine, and returns a hash reference whose keys are the possible numbers of returning scalars, and the corresponding values the "probability" to get them. The special key C<'list'> is used to denote a possibly infinite number of returned arguments. The return value hence would look at
+Takes a reference to a named or anonymous subroutine, and returns a hash reference whose keys are the possible numbers of returning scalars, and the corresponding values the "probability" to get them. The special key C<'list'> is used to denote a possibly infinite number of returned arguments. The return value hence would look at
 
     { 1 => 0.2, 2 => 0.4, 4 => 0.3, list => 0.1 }