Moose/Connection/VISA/VXI11.pm untested

filter: Statementstmt 0.0% 0 / 24 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 6 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 31 SCAR 6.9
CC
1
Cov
0%
gen_resource_name
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 package Lab::Moose::Connection::VISA::VXI11;
2 $Lab::Moose::Connection::VISA::VXI11::VERSION = '3.881';
3 #ABSTRACT: VXI-11 frontend to National Instruments' VISA library.
4  
5 use v5.20;
6  
7  
8  
9 use Moose;
10 use Moose::Util::TypeConstraints qw(enum);
11  
12 use Carp;
13  
14 use namespace::autoclean;
15  
16 extends 'Lab::Moose::Connection::VISA';
17  
18 has host => (
19 is => 'ro',
20 isa => 'Str',
21 required => 1
22 );
23  
24 has '+resource_name' => (
25 required => 0,
26 );
27  
28 sub gen_resource_name {
29 my $self = shift;
30  
31 my $host = $self->host();
32  
33 return "TCPIP::${host}::INSTR";
34 }
35  
36 __PACKAGE__->meta->make_immutable();
37  
38 1;
39  
40 __END__
41  
42 =pod
43  
44 =encoding UTF-8
45  
46 =head1 NAME
47  
48 Lab::Moose::Connection::VISA::VXI11 - VXI-11 frontend to National Instruments' VISA library.
49  
50 =head1 VERSION
51  
52 version 3.881
53  
54 =head1 SYNOPSIS
55  
56 use Lab::Moose
57 my $instrument = instrument(
58 type => 'random_instrument',
59 connection_type => 'VISA::VXI11',
60 connection_options => {host => '132.188.12.12'}
61 );
62  
63 =head1 DESCRIPTION
64  
65 Creates a VXI-11 resource name for the VISA backend.
66  
67 =head1 COPYRIGHT AND LICENSE
68  
69 This software is copyright (c) 2023 by the Lab::Measurement team; in detail:
70  
71 Copyright 2017-2018 Simon Reinhardt
72 2020 Andreas K. Huettel
73  
74  
75 This is free software; you can redistribute it and/or modify it under
76 the same terms as the Perl 5 programming language system itself.
77  
78 =cut