| 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
| |||||||||||
| 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__ | ||||||||||