| 1 | package App::LDAP::LDIF::Group; | ||||||||||
| 2 | |||||||||||
| 3 | 3 | ▶ | use Modern::Perl; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | |||||||||||
| 5 | 3 | ▶ | use Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | |||||||||||
| 7 | 3 | extends qw( | |||||||||
| 8 | App::LDAP::ObjectClass::PosixGroup | ||||||||||
| 9 | App::LDAP::LDIF | ||||||||||
| 10 | ); | ||||||||||
| 11 | |||||||||||
| 12 | 2 | ▶ | around BUILDARGS => sub { | ||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=6.9
| |||||||||||
| 13 | 2 | my $orig = shift; | |||||||||
| 14 | 2 | my $self = shift; | |||||||||
| 15 | 2 | ▶ | push @_, ( dn => "cn=" .{@_}->{cn}[0] . "," . {@_}->{base} ) if grep /^base$/, @_; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 16 | 2 | $self->$orig(@_); | |||||||||
| 17 | 3 | }; | |||||||||
| 18 | |||||||||||
| 19 | has '+objectClass' => ( | ||||||||||
| 20 | 1 | ▶ | default => sub { | ||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||
| 21 | [ | ||||||||||
| 22 | 1 | qw( posixGroup | |||||||||
| 23 | top ) | ||||||||||
| 24 | ] | ||||||||||
| 25 | }, | ||||||||||
| 26 | 3 | ); | |||||||||
| 27 | |||||||||||
| 28 | 3 | has '+userPassword' => ( | |||||||||
| 29 | default => "{crypt}x", | ||||||||||
| 30 | ); | ||||||||||
| 31 | |||||||||||
| 32 | 3 | __PACKAGE__->meta->make_immutable; | |||||||||
| 33 | 3 | ▶ | no Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 34 | |||||||||||
| 35 | 3 | 1; | |||||||||
| 36 | |||||||||||
| 37 | =pod | ||||||||||
| 38 | |||||||||||
| 39 | =head1 NAME | ||||||||||
| 40 | |||||||||||
| 41 | App::LDAP::LDIF::Group - the representation of groups in LDAP | ||||||||||
| 42 | |||||||||||
| 43 | =head1 SYNOPSIS | ||||||||||
| 44 | |||||||||||
| 45 | my $group = App::LDAP::LDIF::Group->new( | ||||||||||
| 46 | base => $base, # The OU (organization unit) which the group belongs to | ||||||||||
| 47 | cn => [$name], # the group name | ||||||||||
| 48 | gidNumber => $id, # the gid of the group | ||||||||||
| 49 | ); | ||||||||||
| 50 | # these three attributes are required | ||||||||||
| 51 | |||||||||||
| 52 | my $entry = $group->entry; | ||||||||||
| 53 | # get the group as a instance of Net::LDAP::Entry | ||||||||||
| 54 | |||||||||||
| 55 | my $group = App::LDAP::LDIF::Group->new($entry) | ||||||||||
| 56 | # new from a entry | ||||||||||
| 57 | |||||||||||
| 58 | =cut | ||||||||||