blib/lib/Eobj/PLglobal.pl

filter: Statementstmt 83.3% 5 / 6 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 50.0% 1 / 2 Podpod n/a totaltotal 70.0% 7 / 10 CC 2 SCAR 7.0
CC
2
Cov
75%
new
2.0
who
2.0
CRAP 2.0
« blib/lib/Eobj/PLerror.pm ↑ Summary testclass.pl »
1 #
2 # This file is part of the Eobj project.
3 #
4 # Copyright (C) 2003, Eli Billauer
5 #
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2 of the License, or
9 # (at your option) any later version.
10 #
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
15 #
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software
18 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 #
20 # A copy of the license can be found in a file named "licence.txt", at the
21 # root directory of this project.
22 #
23  
24 ${__PACKAGE__.'::errorcrawl'}='system';
25 0 ▶sub who {
Subroutine who: not called CC=1 SCAR=6.9
26 0 return "The Global Object";
27 }
28  
29 1 ▶sub new {
Subroutine new: called CC=2 SCAR=7.0
30 1 my $this = shift;
31 1 my $self = $this->SUPER::new(@_);
32  
33 1 my $name = $self->get('name');
34 1 ▶ puke("The \'global\' class can generate an object only with the name \'globalobject\'".
Branch: 1 branch
BranchTrueFalseTotal
unless $name eq "globalobject" 0 1 1
35 " and not \'$name\'\n") unless ($name eq 'globalobject');
36  
37 1 return $self;
38 }
39  
« blib/lib/Eobj/PLerror.pm ↑ Summary testclass.pl »