Zoom5341/Test.pm

filter: Statementstmt 100% 20 / 20 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 0.0% 0 / 1 totaltotal 92.8% 26 / 28 CC 2 SCAR 2.9
CC
2
Cov
95%
load_test_data
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.3
« Zoom5341/Get.pm ↑ Summary Zoom5341.pm »
1 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 package Device::CableModem::Zoom5341;
5  
6  
7 =head1 NAME
8  
9 Device::CableModem::Zoom5341::Test
10  
11 =head1 NOTA BENE
12  
13 This is part of the guts of Device::CableModem::Zoom5341. If you're
14 reading this, you're either developing the module, writing tests, or
15 coloring outside the lines; consider yourself warned.
16  
17 =cut
18  
19  
20 =head2 ->load_test_data
21  
22 Loads sample data for tests
23 =cut
24 sub load_test_data
25 2 ▶{
Subroutine load_test_data: called CC=2 SCAR=6.9
Pod undocumented
26 2 my $self = shift;
27  
28 # We're assuming this is run via 'make test'. Which is strictly
29 # speaking Wrong(tm). But it works well enough for now...
30 # overthink things when it becomes necessary.
31 2 ▶ use File::Basename qw(dirname);
Subroutine BEGIN: called CC=1 SCAR=0.0
32 2 ▶ use File::Spec;
Subroutine BEGIN: called CC=1 SCAR=0.0
33 2 my $sampledata = File::Spec->catfile(dirname($0), 'rf_connection.sample');
34 2 ▶ open my $sdf, '<', $sampledata or die "Couldn't load sample data: $@";
Branch: 1 branch
BranchTrueFalseTotal
open my $sdf, "<", $sampledata or die "Couldn't load sample data: $@" 2 0 2
35 2 my @html = <$sdf>;
36 2 close $sdf;
37  
38 2 chomp @html;
39 2 $self->{conn_html} = \@html;
40 }
41  
42  
43 2 1;
44 __END__
« Zoom5341/Get.pm ↑ Summary Zoom5341.pm »