blib/lib/POE/Component/IRC/Plugin/Logger/Irssi.pm

filter: Statementstmt 94.4% 34 / 36 Branchbran 75.0% 3 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 94.4% 17 / 18 Podpod 0.0% 0 / 1 totaltotal 91.5% 54 / 59 CC 3 SCAR 3.0
CC
3
Cov
92%
__ANON__
3.0
__ANON__
2.0
BEGIN
1.0
CRAP 1.4
↑ Summary
1 package POE::Component::IRC::Plugin::Logger::Irssi;
2  
3 1 our $VERSION = '0.001002';
4  
5 1 ▶use 5.014000;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 1 ▶use parent qw/Exporter/;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 1 our @EXPORT_OK = qw/irssi_format/;
12  
13 ##################################################
14  
15 my %irssi_format = (
16 1 ▶ nick_change => sub { "-!- $_[0] is now known as $_[1]" },
Subroutine __ANON__: called CC=1 SCAR=0.0
17 1 ▶ topic_is => sub { "-!- Topic for $_[0]: $_[1]"},
Subroutine __ANON__: called CC=1 SCAR=0.0
18 2 ▶ topic_change => sub {
Subroutine __ANON__: called CC=3 SCAR=11.1
19 2 my ($nick, $topic) = @_;
20 2 ▶ return "-!- $nick changed the topic to: $topic" if $topic;
Branch: 1 branch
BranchTrueFalseTotal
if $topic 1 1 2
21 1 ▶ return "-!- Topic unset by $nick" unless $topic;
Branch: 1 branch
BranchTrueFalseTotal
unless $topic 1 0 1
22 },
23 1 ▶ privmsg => sub{ "<$_[0]> $_[1]" },
Subroutine __ANON__: called CC=1 SCAR=0.0
24 1 ▶ notice => sub { "-$_[0]- $_[1]" },
Subroutine __ANON__: called CC=1 SCAR=0.0
25 1 ▶ action => sub { "* $_[0] $_[1]" },
Subroutine __ANON__: called CC=1 SCAR=0.0
26 1 ▶ join => sub { "-!- $_[0] [$_[1]] has joined $_[2]" },
Subroutine __ANON__: called CC=1 SCAR=0.0
27 1 ▶ part => sub { "-!- $_[0] [$_[1]] has left $_[2] [$_[3]]" },
Subroutine __ANON__: called CC=1 SCAR=0.0
28 1 ▶ quit => sub { "-!- $_[0] [$_[1]] has quit [$_[2]]"},
Subroutine __ANON__: called CC=1 SCAR=0.0
29 1 ▶ kick => sub { "-!- $_[1] was kicked from $_[2] by $_[0] [$_[3]]"},
Subroutine __ANON__: called CC=1 SCAR=0.0
30 1 ▶ topic_set_by => sub { "-!- Topic set by $_[1] [". localtime($_[2]) .']' },
Subroutine __ANON__: called CC=1 SCAR=0.0
31 1 );
32  
33 1 for my $letter ('a' .. 'z', 'A' .. 'Z') {
34 1 ▶ $irssi_format{"+$letter"} = sub { my $nick = shift; "-!- mode [+$letter @_] by $nick" };
Subroutine __ANON__: called CC=1 SCAR=0.0
35 0 ▶ $irssi_format{"-$letter"} = sub { my $nick = shift; "-!- mode [-$letter @_] by $nick" }
Subroutine __ANON__: not called CC=1 SCAR=6.9
36 52 }
37  
38 1 ▶sub irssi_format { \%irssi_format }
Subroutine irssi_format: called CC=1 SCAR=0.0
Pod undocumented
39  
40 1 1;
41 __END__
↑ Summary