diff options
Diffstat (limited to 'lib/Example')
-rw-r--r-- | lib/Example/Foobar/list.pm | 2 | ||||
-rw-r--r-- | lib/Example/Foobar/proverb.pm | 35 |
2 files changed, 23 insertions, 14 deletions
diff --git a/lib/Example/Foobar/list.pm b/lib/Example/Foobar/list.pm index ebf2efc..1096c03 100644 --- a/lib/Example/Foobar/list.pm +++ b/lib/Example/Foobar/list.pm @@ -17,7 +17,7 @@ use Pod::Usage; =head2 new -Creates new class and saves a "classpath" for further use. Classpath +Creates new object and saves a "classpath" for further use. Classpath is a list of class name components minus the last one. =cut diff --git a/lib/Example/Foobar/proverb.pm b/lib/Example/Foobar/proverb.pm index 8679f77..c1f5744 100644 --- a/lib/Example/Foobar/proverb.pm +++ b/lib/Example/Foobar/proverb.pm @@ -1,4 +1,15 @@ package Example::Foobar::proverb; + +=head1 NAME + +proverb - prints a rephrased proverb + +=head1 DESCRIPTION + +Displays an arbitrary proverb. + +=cut + use strict; use warnings; @@ -17,11 +28,22 @@ my @proverbs = ( ." galled saucepan does not reach 212 degrees Farenheit." ); +=head2 new + +Creates a new object and selects a random proverb to print. + +=cut + sub new { my $class = shift; bless { selection => int(rand(@proverbs)) }, $class; } +=head2 run + +Displays the selected proverb on stdout. + +=cut sub run { my $self = shift; @@ -29,16 +51,3 @@ sub run { } 1; -=head1 NAME - -proverb - prints a rephrased proverb - -=head1 SYNOPSIS - -B<foobar proverb> - -=head1 DESCRIPTION - -Displays an arbitrary proverb. - -=cut |