LoaderTest.pm

filter: Statementstmt 100% 13 / 13 Branchbran n/a Conditioncond 100% 2 / 2 MC/DCmcdc 100% 1 / 1 Subroutinesub 100% 4 / 4 Podpod 0.0% 0 / 3 totaltotal 86.9% 20 / 23 CC 2 SCAR 3.4
CC
2
Cov
100%
foo
2.0
BEGIN
1.0
new
1.0
CRAP 1.4
« Loader.pm ↑ Summary
1 #!/usr/bin/perl -sw
2 ##
3 ##
4 ##
5 ## Copyright (c) 2001, Vipul Ved Prakash. All rights reserved.
6 ## This code is free software; you can redistribute it and/or modify
7 ## it under the same terms as Perl itself.
8 ##
9 ## $Id: LoaderTest.pm,v 1.2 2001/05/01 00:09:12 vipul Exp $
10  
11 package Class::LoaderTest;
12 3 ▶use Data::Dumper;
Subroutine BEGIN: called CC=1 SCAR=0.0
13  
14 1 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
Pod undocumented
15  
16 1 my $self = { Method => 'new' };
17 1 return bless $self, shift;
18  
19 }
20  
21  
22 3 ▶sub foo {
Subroutine foo: called CC=2 SCAR=6.9
Pod undocumented
23  
24 3 my ($class, $embed) = @_;
25 3 ▶ $embed ||= 'foo';
Condition100%2/2
$embed ||= "foo"
l!l
12
MC/DC100%1/1
$embed ||= "foo"
$embed
Truth table100%2/2
A
A= $embed
Aresult
11
00
26 3 my $self = { Method => $embed };
27 3 return bless $self, shift;
28  
29 }
30  
31 1 ▶sub blah {
Subroutine blah: called CC=1 SCAR=0.0
Pod undocumented
32  
33 1 my ($class, %params) = @_;
34 1 my $self = { %params };
35 1 return bless $self, $class;
36  
37 }
38  
39 3 1;
40  
41  
« Loader.pm ↑ Summary