File Coverage

blib/lib/Lab/VXI11.pm
Criterion Covered Total %
statement 25 26 96.1
branch 2 4 50.0
condition n/a
subroutine 7 7 100.0
pod n/a
total 34 37 91.8


line stmt bran cond sub pod time code
1             package Lab::VXI11;
2              
3 1     1   76497 use strict;
  1         3  
  1         30  
4 1     1   5 use warnings;
  1         2  
  1         24  
5 1     1   5 use Carp;
  1         1  
  1         83  
6              
7             require Exporter;
8 1     1   644 use AutoLoader;
  1         1641  
  1         5  
9              
10             our @ISA = qw(Exporter);
11              
12             our @EXPORT = qw(
13             DEVICE_ASYNC
14             DEVICE_ASYNC_VERSION
15             DEVICE_CORE
16             DEVICE_CORE_VERSION
17             DEVICE_INTR
18             DEVICE_INTR_VERSION
19             DEVICE_TCP
20             DEVICE_UDP
21             );
22              
23             our $VERSION = '0.03';
24              
25             sub AUTOLOAD {
26             # This AUTOLOAD is used to 'autoload' constants from the constant()
27             # XS function.
28              
29 8     8   458 my $constname;
30 8         9 our $AUTOLOAD;
31 8         32 ($constname = $AUTOLOAD) =~ s/.*:://;
32 8 50       25 croak "&Lab::VXI11::constant not defined" if $constname eq 'constant';
33 8         40 my ($error, $val) = constant($constname);
34 8 50       16 if ($error) { croak $error; }
  0         0  
35             {
36 1     1   145 no strict 'refs';
  1         2  
  1         106  
  8         11  
37             # Fixed between 5.005_53 and 5.005_61
38             #XXX if ($] >= 5.00561) {
39             #XXX *$AUTOLOAD = sub () { $val };
40             #XXX }
41             #XXX else {
42 8     8   40 *$AUTOLOAD = sub { $val };
  8         85  
43             #XXX }
44             }
45 8         27 goto &$AUTOLOAD;
46             }
47              
48             require XSLoader;
49             XSLoader::load('Lab::VXI11', $VERSION);
50              
51             # Preloaded methods go here.
52              
53             # Autoload methods go after =cut, and are processed by the autosplit program.
54              
55             1;
56             __END__