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   50373 use strict;
  1         2  
  1         26  
4 1     1   4 use warnings;
  1         1  
  1         23  
5 1     1   5 use Carp;
  1         4  
  1         51  
6              
7             require Exporter;
8 1     1   355 use AutoLoader;
  1         1123  
  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.02';
24              
25             sub AUTOLOAD {
26             # This AUTOLOAD is used to 'autoload' constants from the constant()
27             # XS function.
28              
29 8     8   471 my $constname;
30 8         12 our $AUTOLOAD;
31 8         35 ($constname = $AUTOLOAD) =~ s/.*:://;
32 8 50       20 croak "&Lab::VXI11::constant not defined" if $constname eq 'constant';
33 8         30 my ($error, $val) = constant($constname);
34 8 50       15 if ($error) { croak $error; }
  0         0  
35             {
36 1     1   116 no strict 'refs';
  1         2  
  1         97  
  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   41 *$AUTOLOAD = sub { $val };
  8         83  
43             #XXX }
44             }
45 8         23 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__