Instrument/Multimeter.pm untested

filter: Statementstmt 0.0% 0 / 31 Branchbran n/a Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 0.0% 0 / 13 Podpod 0.0% 0 / 10 totaltotal 0.0% 0 / 59 CC 1 SCAR 6.9
CC
1
Cov
0%
new
2.0
id
2.0
get_range
2.0
CRAP 2.0
1 package Lab::Instrument::Multimeter;
2 #ABSTRACT: Generic digital multimeter base class
3 $Lab::Instrument::Multimeter::VERSION = '3.899';
4 use v5.20;
5  
6 use strict;
7 use Lab::Instrument;
8  
9 our @ISA = ("Lab::Instrument");
10  
11 our %fields = (
12 supported_connections => [],
13  
14 device_settings => {},
15  
16 );
17  
18 sub new {
19 my $proto = shift;
20 my $class = ref($proto) || $proto;
21 my $self = $class->SUPER::new(@_);
22 $self->${ \( __PACKAGE__ . '::_construct' ) }(__PACKAGE__);
23 return $self;
24 }
25  
26 # template functions for inheriting classes
27  
28 sub id {
29 die "id not implemented for this instrument\n";
30 }
31  
32 sub get_range {
33 my $self = shift;
34  
35 Lab::Exception::DriverError->throw( "The unimplemented method stub "
36 . __PACKAGE__
37 . "::get_range() has been called. I can't work like this.\n" );
38 }
39  
40 sub set_range {
41 my $self = shift;
42  
43 Lab::Exception::DriverError->throw( "The unimplemented method stub "
44 . __PACKAGE__
45 . "::set_range() has been called. I can't work like this.\n" );
46 }
47  
48 sub get_level {
49 my $self = shift;
50  
51 Lab::Exception::DriverError->throw( "The unimplemented method stub "
52 . __PACKAGE__
53 . "::set_level() has been called. I can't work like this.\n" );
54 }
55  
56 sub selftest {
57 die "selftest not implemented for this instrument\n";
58 }
59  
60 sub configure_voltage_dc {
61 die "configure_voltage_dc not implemented for this instrument\n";
62 }
63  
64 sub configure_voltage_dc_trigger {
65 die "configure_voltage_dc_trigger not implemented for this instrument\n";
66 }
67  
68 sub triggered_read {
69 die "triggered_read not implemented for this instrument\n";
70 }
71  
72 sub get_error {
73 die "get_error not implemented for this instrument\n";
74 }
75  
76 1;
77  
78 __END__