File Coverage

blib/lib/Table/ParentChild/Head.pm
Criterion Covered Total %
statement 21 38 55.2
branch 0 10 0.0
condition 0 3 0.0
subroutine 7 10 70.0
pod n/a
total 28 61 45.9


line stmt bran cond sub pod time code
1             # ============================================================
2             # Table::ParentChild::
3             # _ _ _
4             # | | | | ___ __ _ __| |
5             # | |_| |/ _ \/ _` |/ _` |
6             # | _ | __/ (_| | (_| |
7             # |_| |_|\___|\__,_|\__,_|
8             #
9             # ============================================================
10              
11             =head1 NAME
12              
13             Table::ParentChild::Head - Perl extension for blah blah blah
14              
15             =head1 SYNOPSIS
16              
17             use Table::ParentChild::Head;
18              
19             =head1 DESCRIPTION
20              
21              
22              
23             =cut
24              
25             package Table::ParentChild::Head;
26              
27 1     1   26 use 5.006;
  1         3  
  1         45  
28 1     1   5 use strict;
  1         2  
  1         36  
29 1     1   5 use warnings;
  1         2  
  1         38  
30 1     1   5 use Carp;
  1         2  
  1         93  
31              
32             require Exporter;
33             require DynaLoader;
34 1     1   5 use AutoLoader;
  1         2  
  1         5  
35              
36             our @ISA = qw(Exporter DynaLoader);
37              
38              
39             our %EXPORT_TAGS = ( 'all' => [ qw( ) ] );
40             our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
41             our @EXPORT = qw( );
42             our $VERSION = '0.01';
43              
44             sub AUTOLOAD {
45             # This AUTOLOAD is used to 'autoload' constants from the constant()
46             # XS function. If a constant is not found then control is passed
47             # to the AUTOLOAD in AutoLoader.
48              
49 0     0     my $constname;
50 0           our $AUTOLOAD;
51 0           ($constname = $AUTOLOAD) =~ s/.*:://;
52 0 0         croak "& not defined" if $constname eq 'constant';
53 0 0         my $val = constant($constname, @_ ? $_[0] : 0);
54 0 0         if ($! != 0) {
55 1 0 0 1   63185 if ($! =~ /Invalid/ || $!{EINVAL}) {
  1         1741  
  1         91  
  0            
56 0           $AutoLoader::AUTOLOAD = $AUTOLOAD;
57 0           goto &AutoLoader::AUTOLOAD;
58             }
59             else {
60 0           croak "Your vendor has not defined Table::ParentChild::Head macro $constname";
61             }
62             }
63             {
64 1     1   11 no strict 'refs';
  1         2  
  1         186  
  0            
65             # Fixed between 5.005_53 and 5.005_61
66 0 0         if ($] >= 5.00561) {
67 0     0     *$AUTOLOAD = sub () { $val };
  0            
68             }
69             else {
70 0     0     *$AUTOLOAD = sub { $val };
  0            
71             }
72             }
73 0           goto &$AUTOLOAD;
74             }
75              
76             bootstrap Table::ParentChild::Head $VERSION;
77              
78             1;
79             __END__