Created
March 5, 2013 16:51
-
-
Save cfedde/5091772 to your computer and use it in GitHub Desktop.
an example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package BCV::LDAP::User; | |
use Moose; | |
use namespace::autoclean; | |
has entry => ( | |
is => 'ro', | |
isa => 'Net::LDAP::Entry', | |
); | |
our $AUTOLOAD; | |
sub attributes { | |
my $s = shift; | |
$s->entry->attributes(); | |
} | |
sub AUTOLOAD { | |
my $s = shift; | |
my $attr = $AUTOLOAD; | |
$attr =~ s/.*:://; | |
return $s->entry->get_value($attr); | |
} | |
__PACKAGE__->meta->make_immutable; | |
1; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment