File Coverage

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