blib/lib/Net/LDAP/Gateway/Constant.pm untested

filter: Statementstmt 0.0% 0 / 27 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 0.0% 0 / 4 Podpod n/a totaltotal 0.0% 0 / 36 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 package Net::LDAP::Gateway::Constant;
2  
3 use strict;
4 use warnings;
5  
6 use Net::LDAP::Gateway ();
7  
8 require Exporter;
9 our @ISA = qw(Exporter);
10  
11 our %EXPORT_TAGS;
12  
13 my %tag = map { $_ => uc "LDAP_${_}_"} qw(op deref_aliases scope filter);
14 my %tags;
15  
16 for my $cst (grep /^LDAP_/, keys %{Net::LDAP::Gateway::Constant::}) {
17 my $tag = 'error';
18 # print "cst: $cst\n";
19 for(keys %tag) {
20 $tag = $_
21 if index($cst, $tag{$_}) == 0
22 }
23 push @{$EXPORT_TAGS{$_} ||= []}, $cst
24 for ($tag, 'all');
25  
26 # no strict 'refs';
27 # my $v = ${$cst};
28 # print "cst: $cst\n";
29 # *$cst = sub () { $v };
30 }
31  
32 our @EXPORT_OK = @{$EXPORT_TAGS{all}};
33  
34 1;