File Coverage

blib/lib/Data/RandomPerson/Names/Female.pm
Criterion Covered Total %
statement 20 20 100.0
branch n/a
condition n/a
subroutine 5 5 100.0
pod 1 1 100.0
total 26 26 100.0


line stmt bran cond sub pod time code
1             package Data::RandomPerson::Names::Female;
2              
3 2     2   846 use strict;
  2         3  
  2         68  
4 2     2   8 use warnings;
  2         2  
  2         52  
5              
6 2     2   7 use base 'Data::RandomPerson::Names';
  2         3  
  2         621  
7              
8 2     2   323 use Data::RandomPerson::Choice;
  2         2  
  2         233  
9              
10             sub new {
11 2     2 1 652 my ($class) = @_;
12              
13 2         6 my $self = bless {}, $class;
14              
15 2         7 $self->{choice} = Data::RandomPerson::Choice->new();
16              
17 2         3186 my @names = ;
18 2         171 close DATA;
19 2         258 chomp (@names);
20 2         90 $self->{choice}->add_list(@names);
21              
22 2         173 return $self;
23             }
24              
25             1;
26              
27             =pod
28              
29             =head1 NAME
30              
31             Data::RandomPerson::Names::Female - A list of female names from some census data
32              
33             =head1 SYNOPSIS
34              
35             use Data::RandomPerson::Names::Female;
36              
37             my $f = Data::RandomPerson::Names::Female->new();
38              
39             print $f->get();
40              
41             =head1 DESCRIPTION
42              
43             =head2 Overview
44              
45             Returns a random element from a list of female 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::Female 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__