lib/Games/League/Member.pm

filter: Statementstmt 100% 20 / 20 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod 100% 3 / 3 totaltotal 100% 29 / 29 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/Games/Tournament/RoundRobin.pm ↑ Summary
1 package Games::League::Member;
2  
3 # Last Edit: 2006 2月 11, 07時56分01秒
4 # $Id: /sched/trunk/lib/Games/League/Member.pm 515 2006-02-10T23:06:55.230562Z dv $
5  
6 12 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 12 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 12 ▶use overload qw/0+/ => 'index', qw/""/ => 'name', fallback => 1;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 =head1 NAME
12  
13 Games::League::Member - Objects which Games::Tournament::RoundRobin can pair
14  
15 =head1 VERSION
16  
17 Version 0.01
18  
19 =cut
20  
21 12 our $VERSION = '0.01';
22  
23 =head1 SYNOPSIS
24  
25 my $foo = Games::League::Member->new( index => '15', name => 'Your New Knicks' );
26 ...
27  
28 =head1 DESCRIPTION
29  
30 Games::Tournament::RoundRobin supports objects which have an index and a name method accessor, like this members of this class, Games::League::Member.
31  
32 Games::Tournament::RoundRobin will use this class when constructing a Bye member if the application does not supply one.
33  
34 =head1 REQUIREMENTS
35  
36 Module::Build to install.
37  
38 =head1 METHODS
39  
40 =head2 new
41  
42 Games::League::Member->new( index => '15', name => 'Your New Knicks' )
43  
44 =cut
45  
46 sub new
47 59 ▶{
Subroutine new: called CC=1 SCAR=0.0
Pod documented
48 59 my $class = shift;
49 59 my %args = @_;
50 59 my $index = $args{index};
51 59 my $name = $args{name};
52 59 return bless \%args, $class;
53 }
54  
55 =head2 name
56  
57 $member->name
58  
59 Returns the name of the league member, a string that may or may not be unique to the member.
60  
61 =cut
62  
63 sub name
64 508 ▶{
Subroutine name: called CC=1 SCAR=0.0
Pod documented
65 508 my $self = shift;
66 508 return $self->{name};
67 }
68  
69 =head2 index
70  
71 $member->index
72  
73 Returns the index of the league member, a number unique to the member in the range 0 .. n-1.
74  
75 =cut
76  
77 sub index
78 85 ▶{
Subroutine index: called CC=1 SCAR=0.0
Pod documented
79 85 my $self = shift;
80 85 return $self->{index};
81 }
82  
83 =head1 AUTHOR
84  
85 Dr Bean, C<< <lang at ms.chinmin.edu.tw> >>
86  
87 =head1 BUGS
88  
89 Please report any bugs or feature requests to
90 C<bug-league-member at rt.cpan.org>, or through the web interface at
91 L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Games-RoundRobin-Schedule>.
92 I will be notified, and then you'll automatically be notified of progress on
93 your bug as I make changes.
94  
95 =head1 SUPPORT
96  
97 You can find documentation for this module with the perldoc command.
98  
99 perldoc Games::League::Member
100  
101 You can also look for information at:
102  
103 =over 4
104  
105 =item * AnnoCPAN: Annotated CPAN documentation
106  
107 L<http://annocpan.org/dist/Games-RoundRobin-Schedule>
108  
109 =item * CPAN Ratings
110  
111 L<http://cpanratings.perl.org/d/Games-RoundRobin-Schedule>
112  
113 =item * RT: CPAN's request tracker
114  
115 L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Games-RoundRobin-Schedule>
116  
117 =item * Search CPAN
118  
119 L<http://search.cpan.org/dist/Games-RoundRobin-Schedule>
120  
121 =back
122  
123 =head1 ACKNOWLEDGEMENTS
124  
125 Thanks to the perl community for (0;$every;1) {
126 $stacks .= $i;
127 }
128  
129 =head1 COPYRIGHT & LICENSE
130  
131 Copyright 2006 Dr Bean, all rights reserved.
132  
133 This program is free software; you can redistribute it and/or modify it
134 under the same terms as Perl itself.
135  
136 =cut
137  
138 12 1; # End of Games::League::Member
« blib/lib/Games/Tournament/RoundRobin.pm ↑ Summary