File Coverage

blib/lib/Regexp/MinLength.pm
Criterion Covered Total %
statement 18 29 62.0
branch 0 4 0.0
condition n/a
subroutine 6 8 75.0
pod n/a
total 24 41 58.5


line stmt bran cond sub pod time code
1             package Regexp::MinLength;
2              
3 2     2   58831 use 5.10.1;
  2         7  
  2         91  
4 2     2   11 use strict;
  2         3  
  2         64  
5 2     2   9 use warnings;
  2         7  
  2         73  
6 2     2   9 use Carp;
  2         3  
  2         195  
7              
8             require Exporter;
9 2     2   496850 use AutoLoader;
  2         4957  
  2         17  
10              
11             our @ISA = qw(Exporter);
12              
13             our %EXPORT_TAGS = ( 'all' => [ qw(
14             ) ] );
15              
16             our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
17              
18             our @EXPORT = qw(
19             MinLength
20             );
21              
22             our $VERSION = '0.03';
23              
24             sub AUTOLOAD {
25             # This AUTOLOAD is used to 'autoload' constants from the constant()
26             # XS function.
27              
28 0     0     my $constname;
29 0           our $AUTOLOAD;
30 0           ($constname = $AUTOLOAD) =~ s/.*:://;
31 0 0         croak "&Regexp::constant not defined" if $constname eq 'constant';
32 0           my ($error, $val) = constant($constname);
33 0 0         if ($error) { croak $error; }
  0            
34             {
35 2     2   526 no strict 'refs';
  2         7  
  2         278  
  0            
36 0     0     *$AUTOLOAD = sub { $val };
  0            
37             }
38 0           goto &$AUTOLOAD;
39             }
40              
41             require XSLoader;
42             XSLoader::load('Regexp::MinLength', $VERSION);
43              
44             # Preloaded methods go here.
45              
46             # Autoload methods go after =cut, and are processed by the autosplit program.
47              
48             1;
49             __END__