ClassFile/Util/MarpaTrace.pm

filter: Statementstmt 68.0% 17 / 25 Branchbran 25.0% 1 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 75.0% 6 / 8 Podpod n/a totaltotal 64.8% 24 / 37 SCAR 12.5
CC
3
Cov
62%
PRINT
6.0
BEGIN
2.1
PRINTF
2.0
CRAP 3.5
« ClassFile/Util/AccessFlagsStringification.pm ↑ Summary ClassFile/Util/BNF.pm »
1 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 3 ▶use warnings FATAL => 'all';
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 package MarpaX::Java::ClassFile::Util::MarpaTrace;
5  
6 3 ▶use Class::Load qw/is_class_loaded/;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 # ABSTRACT: Marpa Trace Wrapper
9  
10 3 our $VERSION = '0.008'; # VERSION
11  
12 3 our $AUTHORITY = 'cpan:JDDPAUSE'; # AUTHORITY
13  
14 sub BEGIN {
15 #
16 ## Some Log implementation specificities
17 #
18 3 ▶ Log::Log4perl->wrapper_register(__PACKAGE__) if (is_class_loaded('Log::Log4perl'))
Subroutine BEGIN: called CC=2 SCAR=7.6
Branch: 1 branch
BranchTrueFalseTotal
if is_class_loaded("Log::Log4perl") 0 3 3
19 }
20  
21 sub TIEHANDLE {
22 2 ▶ bless {}, $_[0]
Subroutine TIEHANDLE: called CC=1 SCAR=0.0
23 }
24  
25 sub PRINT {
26 3 ▶ no warnings 'once';
Subroutine BEGIN: called CC=1 SCAR=0.0
27 0 ▶ my $self = $MarpaX::Java::ClassFile::Role::Parser::SELF;
Subroutine PRINT: not called CC=2 SCAR=17.9
28 #
29 # This is supported only if this localized variable is set
30 #
31 0 ▶ if ($self) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self) 0 0 0
32 #
33 # We do not want to be perturbed by automatic thingies coming from $\
34 #
35 0 local $\ = undef;
36 0 map { $self->tracef('%s', $_) } split(/\n/, join('', @_[1..$#_]));
37 }
38 1
39 0 }
40  
41 sub PRINTF {
42 0 ▶ $_[0]->PRINT(sprintf(shift, @_[1..$#_]));
Subroutine PRINTF: not called CC=1 SCAR=6.9
43 0 1
44 }
45  
46 3 1;
47  
48 __END__
49  
50 =pod
51  
52 =encoding UTF-8
53  
54 =head1 NAME
55  
56 MarpaX::Java::ClassFile::Util::MarpaTrace - Marpa Trace Wrapper
57  
58 =head1 VERSION
59  
60 version 0.008
61  
62 =head1 AUTHOR
63  
64 Jean-Damien Durand <jeandamiendurand@free.fr>
65  
66 =head1 COPYRIGHT AND LICENSE
67  
68 This software is copyright (c) 2016 by Jean-Damien Durand.
69  
70 This is free software; you can redistribute it and/or modify it under
71 the same terms as the Perl 5 programming language system itself.
72  
73 =cut
« ClassFile/Util/AccessFlagsStringification.pm ↑ Summary ClassFile/Util/BNF.pm »