line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
package Lingua::Alphabet::Phonetic::StarWars; |
3
|
|
|
|
|
|
|
|
4
|
2
|
|
|
2
|
|
33814
|
use strict; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
52
|
|
5
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
66
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=head1 NAME |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
Lingua::Alphabet::Phonetic::StarWars - map ASCII characters to names of Star Wars characters |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=head1 SYNOPSIS |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
This is a specialization of L. |
14
|
|
|
|
|
|
|
You should not use this module directly; |
15
|
|
|
|
|
|
|
all interaction should be done with an object of type Lingua::Alphabet::Phonetic. |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
my $oSpeaker = new Lingua::Alphabet::Phonetic('StarWars'); |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=head1 NOTES |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=head1 SEE ALSO |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
http://www.wookieepedia.org |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=head1 BUGS |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
Please tell the author if you find any! |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head1 AUTHOR |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
Martin 'Kingpin' Thurn, C, L. |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=head1 LICENSE |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
This software is released under the same license as Perl itself. |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=cut |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
##################################################################### |
40
|
|
|
|
|
|
|
|
41
|
2
|
|
|
2
|
|
16
|
use base 'Lingua::Alphabet::Phonetic'; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
882
|
|
42
|
|
|
|
|
|
|
our |
43
|
|
|
|
|
|
|
$VERSION = 1.201; |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
my @as = qw( |
46
|
|
|
|
|
|
|
Ackbar |
47
|
|
|
|
|
|
|
Bantha |
48
|
|
|
|
|
|
|
Chewbacca |
49
|
|
|
|
|
|
|
Dengar |
50
|
|
|
|
|
|
|
Evazan |
51
|
|
|
|
|
|
|
Fisto |
52
|
|
|
|
|
|
|
Greedo |
53
|
|
|
|
|
|
|
Hutt |
54
|
|
|
|
|
|
|
Isolder |
55
|
|
|
|
|
|
|
Jedi |
56
|
|
|
|
|
|
|
Kenobi |
57
|
|
|
|
|
|
|
Leia |
58
|
|
|
|
|
|
|
Mothma |
59
|
|
|
|
|
|
|
Needa |
60
|
|
|
|
|
|
|
Organa |
61
|
|
|
|
|
|
|
Palpatine |
62
|
|
|
|
|
|
|
Quadinaros |
63
|
|
|
|
|
|
|
Ree-Yees |
64
|
|
|
|
|
|
|
Skywalker |
65
|
|
|
|
|
|
|
Tyranus |
66
|
|
|
|
|
|
|
Ugnaught |
67
|
|
|
|
|
|
|
Vader |
68
|
|
|
|
|
|
|
Wampa |
69
|
|
|
|
|
|
|
X-wing |
70
|
|
|
|
|
|
|
Yoda |
71
|
|
|
|
|
|
|
Zuckuss |
72
|
|
|
|
|
|
|
); |
73
|
|
|
|
|
|
|
my %hash = map { uc substr($_,0,1) => $_ } @as; |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
sub _name_of_letter |
76
|
|
|
|
|
|
|
{ |
77
|
26
|
|
|
26
|
|
2650
|
my $self = shift; |
78
|
26
|
|
|
|
|
36
|
my $s = shift; |
79
|
|
|
|
|
|
|
# print STDERR " + L::A::P::StarWars::_name_of_letter($s)\n"; |
80
|
|
|
|
|
|
|
# If we get more than one character, ignore the rest: |
81
|
26
|
|
|
|
|
60
|
my $c = uc substr($s, 0, 1); |
82
|
|
|
|
|
|
|
# This module throws out punctuation: |
83
|
26
|
100
|
|
|
|
83
|
return if $c !~ m/[A-Z0-9]/; |
84
|
22
|
50
|
|
|
|
53
|
if (exists($hash{$c})) |
85
|
|
|
|
|
|
|
{ |
86
|
22
|
|
|
|
|
59
|
return $hash{$c}; |
87
|
|
|
|
|
|
|
} # if |
88
|
0
|
|
|
|
|
|
return $self->SUPER::_name_of_letter($s); |
89
|
|
|
|
|
|
|
} # _name_of_letter |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
1; |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
__END__ |