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   49116 use strict;
  1         2  
  1         23  
4 1     1   4 use warnings;
  1         1  
  1         22  
5 1     1   4 use Carp;
  1         5  
  1         48  
6              
7             require Exporter;
8 1     1   361 use AutoLoader;
  1         1008  
  1         4  
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.01';
24              
25             sub AUTOLOAD {
26             # This AUTOLOAD is used to 'autoload' constants from the constant()
27             # XS function.
28              
29 8     8   412 my $constname;
30 8         9 our $AUTOLOAD;
31 8         30 ($constname = $AUTOLOAD) =~ s/.*:://;
32 8 50       21 croak "&Lab::VXI11::constant not defined" if $constname eq 'constant';
33 8         27 my ($error, $val) = constant($constname);
34 8 50       15 if ($error) { croak $error; }
  0         0  
35             {
36 1     1   115 no strict 'refs';
  1         2  
  1         91  
  8         9  
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   36 *$AUTOLOAD = sub { $val };
  8         78  
43             #XXX }
44             }
45 8         22 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__