blib/lib/Audio/DSP.pm

filter: Statementstmt 62.5% 20 / 32 Branchbran 0.0% 0 / 8 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 66.6% 4 / 6 Podpod n/a totaltotal 52.1% 24 / 46 CC 5 SCAR 24.3
CC
5
Cov
50%
AUTOLOAD
21.4
__ANON__
2.0
BEGIN
1.0
CRAP 11.3
↑ Summary DSP.xs »
1 package Audio::DSP;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use vars qw($VERSION @ISA @EXPORT @EXPORT_OK $AUTOLOAD);
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 1 require Exporter;
8 1 require DynaLoader;
9 1 require AutoLoader;
10  
11 1 @ISA = qw(Exporter DynaLoader);
12 1 @EXPORT = qw(AFMT_A_LAW
13 AFMT_IMA_ADPCM
14 AFMT_MPEG
15 AFMT_MU_LAW
16 AFMT_QUERY
17 AFMT_S16_BE
18 AFMT_S16_LE
19 AFMT_S16_NE
20 AFMT_S8
21 AFMT_U16_BE
22 AFMT_U16_LE
23 AFMT_U8
24 );
25  
26 1 $VERSION = '0.02';
27  
28 0 ▶sub AUTOLOAD {
Subroutine AUTOLOAD: not called CC=5 SCAR=30.7
29 # This AUTOLOAD is used to 'autoload' constants from the constant()
30 # XS function. If a constant is not found then control is passed
31 # to the AUTOLOAD in AutoLoader.
32  
33 0 my $constname;
34 0 ($constname = $AUTOLOAD) =~ s/.*:://;
35 0 ▶ croak "& not defined" if $constname eq 'constant';
Branch: 1 branch
BranchTrueFalseTotal
if $constname eq "constant" 0 0 0
36 0 ▶ my $val = constant($constname, @_ ? $_[0] : 0);
Branch: 1 branch
BranchTrueFalseTotal
@_ ? : 0 0 0
37 0 ▶ if ($! != 0) {
Branch: 1 branch
BranchTrueFalseTotal
if ($! != 0) 0 0 0
38 0 ▶ if ($! =~ /Invalid/) {
Branch: 1 branch
BranchTrueFalseTotal
if ($! =~ /Invalid/) { } 0 0 0
39 0 $AutoLoader::AUTOLOAD = $AUTOLOAD;
40 0 goto &AutoLoader::AUTOLOAD;
41 }
42 else {
43 0 croak "Your vendor has not defined Audio::DSP macro $constname";
44 }
45 }
46 1 ▶ no strict 'refs';
Subroutine BEGIN: called CC=1 SCAR=0.0
47 0 ▶ *$AUTOLOAD = sub { $val };
Subroutine __ANON__: not called CC=1 SCAR=6.9
48 0 goto &$AUTOLOAD;
49 }
50  
51 1 bootstrap Audio::DSP $VERSION;
52  
53 1 1;
54 __END__
↑ Summary DSP.xs »