blib/lib/Image/Caption.pm

filter: Statementstmt 63.0% 29 / 46 Branchbran 0.0% 0 / 10 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 66.6% 6 / 9 Podpod n/a totaltotal 50.0% 35 / 70 CC 7 SCAR 28.4
CC
7
Cov
49%
AUTOLOAD
35.4
__ANON__
2.0
__ANON__
2.0
CRAP 17.2
↑ Summary font-bdf.c »
1 package Image::Caption;
2  
3 1 require 5.005_62;
4 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 1 require Exporter;
9 1 require DynaLoader;
10 1 ▶use AutoLoader;
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 1 our @ISA = qw(Exporter DynaLoader);
13  
14 # Items to export into callers namespace by default. Note: do not export
15 # names by default without a very good reason. Use EXPORT_OK instead.
16 # Do not simply export all your public functions/methods/constants.
17  
18 # This allows declaration use Image::Caption ':all';
19 # If you do not need this, moving things directly into @EXPORT or @EXPORT_OK
20 # will save memory.
21 1 our %EXPORT_TAGS = ( 'all' => [ qw(
22
23 ) ] );
24  
25 1 our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
26  
27 1 our @EXPORT = qw(
28 add_caption
29 );
30 1 our $VERSION = '0.01';
31  
32 0 ▶sub AUTOLOAD {
Subroutine AUTOLOAD: not called CC=7 SCAR=35.7
33 # This AUTOLOAD is used to 'autoload' constants from the constant()
34 # XS function. If a constant is not found then control is passed
35 # to the AUTOLOAD in AutoLoader.
36  
37 0 my $constname;
38 0 our $AUTOLOAD;
39 0 ($constname = $AUTOLOAD) =~ s/.*:://;
40 0 ▶ croak "& not defined" if $constname eq 'constant';
Branch: 1 branch
BranchTrueFalseTotal
if $constname eq "constant" 0 0 0
41 0 ▶ my $val = constant($constname, @_ ? $_[0] : 0);
Branch: 1 branch
BranchTrueFalseTotal
@_ ? : 0 0 0
42 0 ▶ if ($! != 0) {
Branch: 1 branch
BranchTrueFalseTotal
if ($! != 0) 0 0 0
43 0 ▶ if ($! =~ /Invalid/ || $!{EINVAL}) {
Subroutine BEGIN: called CC=1 SCAR=2.6
Branch: 1 branch
BranchTrueFalseTotal
if ($! =~ /Invalid/ or $!{'EINVAL'}) { } 0 0 0
Condition0%0/3
$! =~ /Invalid/ or $!{"EINVAL"}
l!l&&r!l&&!r
000
MC/DC0%0/2
$! =~ /Invalid/ or $!{"EINVAL"}
$! =~ /Invalid/ $!{"EINVAL"}
Truth table0%0/3
A or B
A= $! =~ /Invalid/B= $!{"EINVAL"}
ABresult
1X1
011
000
44 0 $AutoLoader::AUTOLOAD = $AUTOLOAD;
45 0 goto &AutoLoader::AUTOLOAD;
46 }
47 else {
48 0 croak "Your vendor has not defined Image::Caption macro $constname";
49 }
50 }
51 {
52 0 ▶ no strict 'refs';
Subroutine BEGIN: called CC=1 SCAR=0.2
53 # Fixed between 5.005_53 and 5.005_61
54 0 ▶ if ($] >= 5.00561) {
Branch: 1 branch
BranchTrueFalseTotal
if ($] >= 5.00561) { } 0 0 0
55 0 ▶ *$AUTOLOAD = sub () { $val };
Subroutine __ANON__: not called CC=1 SCAR=6.9
56 }
57 else {
58 0 ▶ *$AUTOLOAD = sub { $val };
Subroutine __ANON__: not called CC=1 SCAR=6.9
59 }
60 }
61 0 goto &$AUTOLOAD;
62 }
63  
64 1 bootstrap Image::Caption $VERSION;
65  
66 # Preloaded methods go here.
67  
68 # Autoload methods go after =cut, and are processed by the autosplit program.
69  
70 1 1;
71 __END__
↑ Summary font-bdf.c »