Connection/TCPraw.pm

filter: Statementstmt 75.0% 21 / 28 Branchbran n/a Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 85.7% 6 / 7 Podpod 100% 1 / 1 totaltotal 68.2% 28 / 41 SCAR 7.6
CC
2
Cov
68%
new
6.0
BEGIN
1.0
BEGIN
1.0
CRAP 2.1
« Moose/Sweep/Step/Power.pm ↑ Summary Moose/Sweep/Step/Pulsedelay.pm »
1 package Lab::Connection::TCPraw;
2 #ABSTRACT: Raw TCP connection; deprecated, use Socket instead
3 1 $Lab::Connection::TCPraw::VERSION = '3.881';
4 1 ▶use v5.20;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 ▶use Scalar::Util qw(weaken);
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 ▶use Time::HiRes qw (usleep sleep);
Subroutine BEGIN: called CC=1 SCAR=0.0
9 1 ▶use Lab::Connection::GPIB;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 1 ▶use Lab::Exception;
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 1 our @ISA = ("Lab::Connection::Socket");
13  
14 1 our %fields = (
15 bus_class => 'Lab::Bus::Socket',
16 proto => 'tcp',
17 remote_port => '5025',
18 wait_status => 0, # usec;
19 wait_query => 10e-6, # sec;
20 read_length => 1000, # bytes
21 timeout => 1, # seconds
22 );
23  
24 # basically, we're just calling Socket with decent default port and proto
25  
26 sub new {
27 0 ▶ my $proto = shift;
Subroutine new: not called CC=2 SCAR=17.9
Pod documented
28 0 ▶ my $class = ref($proto) || $proto;
Condition0%0/3
ref $proto || $proto
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $proto || $proto
ref $proto $proto
Truth table0%0/3
A || B
A= ref $protoB= $proto
ABresult
1X1
011
000
29 0 my $twin = undef;
30 0 my $self = $class->SUPER::new(@_)
31 ; # getting fields and _permitted from parent class
32 0 $self->${ \( __PACKAGE__ . '::_construct' ) }(__PACKAGE__);
33  
34 0 return $self;
35 }
36  
37 #
38 # That's all folks. For now.
39 #
40  
41 1 1;
42  
43 __END__
44  
45 =pod
46  
47 =encoding UTF-8
48  
49 =head1 NAME
50  
51 Lab::Connection::TCPraw - Raw TCP connection; deprecated, use Socket instead
52  
53 =head1 VERSION
54  
55 version 3.881
56  
57 =head1 COPYRIGHT AND LICENSE
58  
59 This software is copyright (c) 2023 by the Lab::Measurement team; in detail:
60  
61 Copyright 2011 Andreas K. Huettel, Florian Olbrich
62 2012 Florian Olbrich, Hermann Kraus
63 2013 Andreas K. Huettel
64 2016 Simon Reinhardt
65 2017 Andreas K. Huettel
66 2020 Andreas K. Huettel
67  
68  
69 This is free software; you can redistribute it and/or modify it under
70 the same terms as the Perl 5 programming language system itself.
71  
72 =cut
« Moose/Sweep/Step/Power.pm ↑ Summary Moose/Sweep/Step/Pulsedelay.pm »