line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#!/usr/local/bin/perl -w |
2
|
|
|
|
|
|
|
###################################################################### |
3
|
|
|
|
|
|
|
# Copyright 2002, Tim Maher. tim@teachmeperl.com All Rights Reserved # |
4
|
|
|
|
|
|
|
###################################################################### |
5
|
|
|
|
|
|
|
# name2verse.pl: Uses Lingua::EN::Namegame to make verse from name |
6
|
|
|
|
|
|
|
|
7
|
4
|
|
|
4
|
|
23
|
use strict; |
|
4
|
|
|
|
|
5
|
|
|
4
|
|
|
|
|
122
|
|
8
|
|
|
|
|
|
|
|
9
|
4
|
|
|
4
|
|
2101
|
use Lingua::EN::Namegame; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
6914
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
# Default argument simplifies testing |
12
|
4
|
50
|
|
|
|
20
|
@ARGV or @ARGV=qw(krusty); |
13
|
|
|
|
|
|
|
|
14
|
4
|
|
|
|
|
12
|
my $name = ($ARGV[0]); |
15
|
4
|
|
|
|
|
26
|
my $verse = name2verse($ARGV[0]); |
16
|
|
|
|
|
|
|
|
17
|
4
|
50
|
|
|
|
15
|
if (defined $verse) { |
18
|
4
|
|
|
|
|
0
|
print "$verse\n\n"; |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
else { |
21
|
0
|
|
|
|
|
0
|
warn "Error creating verse for $name\n\n"; # this shouldn't happen |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|