File Coverage

blib/lib/Lab/Connection/TCPraw.pm
Criterion Covered Total %
statement 17 24 70.8
branch n/a
condition 0 3 0.0
subroutine 6 7 85.7
pod 1 1 100.0
total 24 35 68.5


line stmt bran cond sub pod time code
1             package Lab::Connection::TCPraw;
2             #ABSTRACT: Raw TCP connection; deprecated, use Socket instead
3             $Lab::Connection::TCPraw::VERSION = '3.880';
4 1     1   1882 use v5.20;
  1         4  
5              
6 1     1   6 use strict;
  1         2  
  1         26  
7 1     1   6 use Scalar::Util qw(weaken);
  1         1  
  1         52  
8 1     1   5 use Time::HiRes qw (usleep sleep);
  1         2  
  1         10  
9 1     1   617 use Lab::Connection::GPIB;
  1         4  
  1         33  
10 1     1   8 use Lab::Exception;
  1         2  
  1         133  
11              
12             our @ISA = ("Lab::Connection::Socket");
13              
14             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     0 1   my $proto = shift;
28 0   0       my $class = ref($proto) || $proto;
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__);
  0            
33              
34 0           return $self;
35             }
36              
37             #
38             # That's all folks. For now.
39             #
40              
41             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.880
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