File Coverage

blib/lib/App/LDAP/LDIF/OrgUnit.pm
Criterion Covered Total %
statement 4 6 66.6
branch n/a
condition n/a
subroutine 2 2 100.0
pod n/a
total 6 8 75.0


line stmt bran cond sub pod time code
1             package App::LDAP::LDIF::OrgUnit;
2              
3 1     1   27 use Modern::Perl;
  1         2  
  1         10  
4              
5 1     1   633 use Moose;
  0            
  0            
6              
7             extends qw(
8             App::LDAP::ObjectClass::OrganizationalUnit
9             App::LDAP::LDIF
10             );
11              
12             around BUILDARGS => sub {
13             my $orig = shift;
14             my $self = shift;
15             push @_, ( dn => "ou=" .{@_}->{ou} ."," . {@_}->{base} ) if grep /^base$/, @_;
16             $self->$orig(@_);
17             };
18              
19             has '+objectClass' => (
20             default => sub {
21             [
22             qw( organizationalUnit )
23             ]
24             },
25             );
26              
27             __PACKAGE__->meta->make_immutable;
28             no Moose;
29              
30             1;
31              
32             __END__
33              
34             =pod
35              
36             =head1 NAME
37              
38             App::LDAP::LDIF::OrgUnit - the representation of organization unit in LDAP
39              
40             =head1 SYNOPSIS
41              
42             my $ou = App::LDAP::LDIF::OrgUnit->new(
43             base => $base,
44             ou => $name,
45             );
46              
47             =cut