| 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"
MC/DC100%1/1
$embed ||= "foo"
$embed
Truth table100%2/2
A
A= $embed
| |||||||||||||
| 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 | |||||||||||||