LDAP/Command/Search.pm untested

filter: Statementstmt 0.0% 0 / 16 Branchbran n/a Conditioncond 0.0% 0 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 0.0% 0 / 4 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 24 CC 1 SCAR 6.9
CC
1
Cov
0%
run
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 package App::LDAP::Command::Search;
2  
3 use Modern::Perl;
4  
5 use Moose;
6  
7 with qw( App::LDAP::Role::Command
8 App::LDAP::Role::Bindable );
9  
10 sub run {
11 my ($self, ) = @_;
12  
13 my $filter = $self->extra_argv->[1] or die "no filter specified";
14  
15 my @entries = ldap()->search(
16 base => config()->{base},
17 scope => "sub",
18 filter => $filter,
19 )->entries;
20  
21 for (@entries) {
22 say $_->ldif;
23 }
24 }
25  
26 __PACKAGE__->meta->make_immutable;
27 no Moose;
28  
29 1;