File Coverage

blib/lib/Games/AssaultCube/Log/Line/BlacklistEntries.pm
Criterion Covered Total %
statement 1 3 33.3
branch n/a
condition n/a
subroutine 1 1 100.0
pod n/a
total 2 4 50.0


line stmt bran cond sub pod time code
1             # Declare our package
2             package Games::AssaultCube::Log::Line::BlacklistEntries;
3              
4             # import the Moose stuff
5 1     1   2660 use Moose;
  0            
  0            
6              
7             # Initialize our version
8             use vars qw( $VERSION );
9             $VERSION = '0.04';
10              
11             extends 'Games::AssaultCube::Log::Line::AdminPasswords';
12              
13             # TODO improve validation for everything here, ha!
14              
15             has 'count_secondary' => (
16             isa => 'Int',
17             is => 'ro',
18             required => 1,
19             );
20              
21             has 'tostr' => (
22             isa => 'Str',
23             is => 'ro',
24             lazy => 1,
25             default => sub {
26             my $self = shift;
27             return "Loaded " . $self->count . " blacklist entries ( " . $self->count_secondary . " secondary ) from " . $self->config;
28             },
29             );
30              
31             no Moose;
32             __PACKAGE__->meta->make_immutable;
33              
34             1;
35             __END__
36              
37             =for stopwords configfile
38             =head1 NAME
39              
40             Games::AssaultCube::Log::Line::BlacklistEntries - Describes the BlacklistEntries event in a log line
41              
42             =head1 ABSTRACT
43              
44             Describes the BlacklistEntries event in a log line
45              
46             =head1 DESCRIPTION
47              
48             This module holds the "BlacklistEntries" event data from a log line. Normally, you would not use this class directly
49             but via the L<Games::AssaultCube::Log::Line> class.
50              
51             This line is emitted when the AC server successfully loaded the blacklist entries from the configfile.
52              
53             =head2 Attributes
54              
55             Those attributes hold information about the event. As this class extends the L<Games::AssaultCube::Log::Line::Base>
56             class, you can also use it's attributes too.
57              
58             =head3 count
59              
60             The number of blacklist entries loaded
61              
62             =head3 count_secondary
63              
64             The number of secondary blacklist entries loaded
65              
66             =head3 config
67              
68             The blacklist config filename
69              
70             =head1 AUTHOR
71              
72             Apocalypse E<lt>apocal@cpan.orgE<gt>
73              
74             Props goes to the BS clan for the support!
75              
76             This project is sponsored by L<http://cubestats.net>
77              
78             =head1 COPYRIGHT AND LICENSE
79              
80             Copyright 2009 by Apocalypse
81              
82             This library is free software; you can redistribute it and/or modify
83             it under the same terms as Perl itself.
84              
85             =cut