Component/IRC/Service.pm

filter: Statementstmt 80.6% 25 / 31 Branchbran 33.3% 2 / 6 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 100% 6 / 6 Podpod 100% 1 / 1 totaltotal 71.4% 35 / 49 CC 5 SCAR 15.6
CC
5
Cov
70%
new
8.6
BEGIN
1.0
BEGIN
1.0
CRAP 4.8
« Component/IRC/Service/P10.pm ↑ Summary
1 # POE::Component::IRC::Service
2 # By Chris Williams <chris@bingosnet.co.uk>
3 #
4 # This module may be used, modified, and distributed under the same
5 # terms as Perl itself. Please see the license that came with your Perl
6 # distribution for details.
7 #
8  
9 package POE::Component::IRC::Service;
10  
11 # This is just a wrapper for the following modules
12  
13 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
14 1 ▶use POE::Component::IRC::Service::P10;
Subroutine BEGIN: called CC=1 SCAR=0.0
15 1 ▶use POE::Component::IRC::Service::Hybrid;
Subroutine BEGIN: called CC=1 SCAR=0.0
16 1 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
17 1 ▶use vars qw($VERSION);
Subroutine BEGIN: called CC=1 SCAR=0.0
18  
19 1 $VERSION = '0.998';
20  
21 1 ▶sub new {
Subroutine new: called CC=5 SCAR=21.5
Pod documented
22 1 my ($package,$alias,$ircdtype) = splice @_, 0, 3;
23 1 my $object;
24  
25 1 ▶ unless ($alias and $ircdtype) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($alias and $ircdtype) 0 1 1
Condition33%1/3
$alias and $ircdtype
!ll&&!rl&&r
001
MC/DC0%0/2
$alias and $ircdtype
$alias $ircdtype
Truth table33%1/3
A and B
A= $aliasB= $ircdtype
ABresult
0X0
100
111
26 0 croak "Not enough arguments to POE::Component::IRC::Service::new()";
27 }
28  
29 SWITCH: {
30 1 ▶ if ($ircdtype =~ /^p10$/i) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ircdtype =~ /^p10$/i) 1 0 1
31 1 $object = POE::Component::IRC::Service::P10->new($alias,@_);
32 1 last SWITCH;
33 }
34 0 ▶ if ($ircdtype =~ /^Hybrid$/i) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ircdtype =~ /^Hybrid$/i) 0 0 0
35 0 croak "Not implemented yet";
36 0 $object = POE::Component::IRC::Service::Hybrid->new($alias,@_);
37 0 last SWITCH;
38 }
39 0 croak "Don't know that IRCD type sorry";
40 }
41 1 return $object;
42 }
43  
44 1 1;
45 __END__
« Component/IRC/Service/P10.pm ↑ Summary