aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2020-03-31 12:45:27 +0300
committerSergey Poznyakoff <gray@gnu.org>2020-03-31 12:45:27 +0300
commit5c6c6ad5c68fc60b1c84f965a3ac9b4a1bd27d58 (patch)
treece641d652927da619ce00ec6334e7032d3afb0ca
parentccd334f1fbdf0aefd7d53733e62fbc76a30feaf2 (diff)
downloadfoobar-5c6c6ad5c68fc60b1c84f965a3ac9b4a1bd27d58.tar.gz
foobar-5c6c6ad5c68fc60b1c84f965a3ac9b4a1bd27d58.tar.bz2
Minor fixes
* Makefile.PL: Remove unneeded modules. * README: Fix spelling. * lib/Example/Foobar/list.pm: Fix typo. * lib/Example/Foobar/proverb.pm: Fix description.
-rw-r--r--Makefile.PL4
-rw-r--r--README2
-rw-r--r--lib/Example/Foobar/list.pm2
-rw-r--r--lib/Example/Foobar/proverb.pm35
4 files changed, 24 insertions, 19 deletions
diff --git a/Makefile.PL b/Makefile.PL
index 94feff8..71d2c06 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -12,12 +12,8 @@ WriteMakefile(
EXE_FILES => [ 'foobar' ],
MIN_PERL_VERSION => 5.014002,
PREREQ_PM => {
- 'Getopt::Long' => 2.34,
'File::Basename' => 0,
'File::Spec' => 0,
- 'File::Temp' => 0.23,
- 'Pod::Find' => 0,
- 'Pod::Man' => 0,
'Pod::Usage' => 0
},
);
diff --git a/README b/README
index 8d7a452..ec15d71 100644
--- a/README
+++ b/README
@@ -1,6 +1,6 @@
* Overview
-This example package illustrate the implementation of dynamically
+This example package illustrates the implementation of dynamically
loaded Perl modules. The word dynamically here means that the module
name is not known beforehand to the main program. Instead, it is
supplied by the user via command line or configuration file.
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

Return to:

Send suggestions and report system problems to the System administrator.