line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Data::RandomPerson::Names::Male; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
688
|
use strict; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
73
|
|
4
|
2
|
|
|
2
|
|
8
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
55
|
|
5
|
|
|
|
|
|
|
|
6
|
2
|
|
|
2
|
|
8
|
use base 'Data::RandomPerson::Names'; |
|
2
|
|
|
|
|
1
|
|
|
2
|
|
|
|
|
702
|
|
7
|
|
|
|
|
|
|
|
8
|
2
|
|
|
2
|
|
330
|
use Data::RandomPerson::Choice; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
185
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub new { |
11
|
2
|
|
|
2
|
1
|
656
|
my ($class) = @_; |
12
|
|
|
|
|
|
|
|
13
|
2
|
|
|
|
|
7
|
my $self = bless {}, $class; |
14
|
|
|
|
|
|
|
|
15
|
2
|
|
|
|
|
10
|
$self->{choice} = Data::RandomPerson::Choice->new(); |
16
|
|
|
|
|
|
|
|
17
|
2
|
|
|
|
|
956
|
my @names = ; |
18
|
2
|
|
|
|
|
67
|
close DATA; |
19
|
2
|
|
|
|
|
69
|
chomp (@names); |
20
|
2
|
|
|
|
|
39
|
$self->{choice}->add_list(@names); |
21
|
|
|
|
|
|
|
|
22
|
2
|
|
|
|
|
56
|
return $self; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
1; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=pod |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head1 NAME |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
Data::RandomPerson::Names::Male - A list of male names from some census data |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=head1 SYNOPSIS |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
use Data::RandomPerson::Names::Male; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
my $m = Data::RandomPerson::Names::Male->new(); |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
print $m->get(); |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head1 DESCRIPTION |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head2 Overview |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
Returns a random element from a list of male names culled from some census data. |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head2 Constructors and initialization |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=over 4 |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=item new( ) |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
Create the Data::RandomPerson::Names::Male object. |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=back |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head2 Class and object methods |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=over 4 |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=item get( ) |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
Returns a random name from the list. |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=item size( ) |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
Returns the size of the list |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=back |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=head1 AUTHOR |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
Peter Hickman (peterhi@ntlworld.com) |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=head1 COPYRIGHT |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
Copyright (c) 2005, Peter Hickman. This module is |
78
|
|
|
|
|
|
|
free software. It may be used, redistributed and/or modified under the |
79
|
|
|
|
|
|
|
same terms as Perl itself. |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=cut |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
__DATA__ |