| 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; |