IRC2/Chan.pm

filter: Statementstmt 93.7% 15 / 16 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 83.3% 5 / 6 Podpod n/a totaltotal 83.3% 20 / 24 CC 2 SCAR 8.9
CC
2
Cov
83%
new
6.0
BEGIN
1.0
BEGIN
1.0
CRAP 2.4
« IRC2/Event.pm ↑ Summary IRC2.pm »
1 #
2 # Copyright 2005, Karl Y. Pradene <knotty@cpan.org> All rights reserved.
3 #
4  
5 package Net::IRC2::Chan ;
6  
7 1 ▶use strict; use warnings ;
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 ▶use Exporter ;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 our @ISA = qw( Exporter ) ;
11 our @EXPORT_OK = qw( new ) ;
12 our @Export = qw( new ) ;
13  
14 1 ▶use vars qw( $VERSION ) ;
Subroutine BEGIN: called CC=1 SCAR=0.0
15 $VERSION = '0.27' ;
16  
17 0 ▶sub new { shift and return bless { @_ } }
Subroutine new: not called CC=2 SCAR=17.9
Branch: 1 branch
BranchTrueFalseTotal
shift() and return bless({@_}) 0 0 0
18  
19
20 { my ( $code, $name ) = q{ sub { return $_[0]->{NAME} = $_[1] || $_[0]->{NAME} } } ;
21 1 ▶ no strict 'refs' ;
Subroutine BEGIN: called CC=1 SCAR=0.0
22 foreach $name qw( name topic ) {
23 $_ = $code ; s/NAME/$name/g ; *{$name} = eval } }
24  
25  
26 no strict ;
27 map { *{$_} = eval 'sub { return $_[0]->{'.$_.'} = $_[1] || $_[0]->{'.$_.'} }'
28 } qw ( name topic );
29 use strict;
30  
31  
32 1;
33  
34 __END__
« IRC2/Event.pm ↑ Summary IRC2.pm »