From 465f8ed1b317afb1c7aefde04e53118a19be1a18 Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Tue, 29 Jan 2013 21:44:24 +0100 Subject: Finished the factoring of localpart-related methods. --- lib/Fripost/Schema.pm | 26 +++++--------------------- 1 file changed, 5 insertions(+), 21 deletions(-) (limited to 'lib/Fripost/Schema.pm') diff --git a/lib/Fripost/Schema.pm b/lib/Fripost/Schema.pm index 42ebac5..2d613f0 100644 --- a/lib/Fripost/Schema.pm +++ b/lib/Fripost/Schema.pm @@ -19,12 +19,12 @@ use warnings; use utf8; use parent 'Fripost::Schema::Auth'; -use Fripost::Schema::Util qw/canonical_dn ldap_explode_dn split_addr/; use Fripost::Schema::Domain; -use Fripost::Schema::User; -use Fripost::Schema::Alias; -use Fripost::Schema::List; +#use Fripost::Schema::User; +#use Fripost::Schema::Alias; +#use Fripost::Schema::List; use Fripost::Schema::Local; +use Fripost::Schema::Pending; =head1 METHODS @@ -80,6 +80,7 @@ local-specific (users, aliases and lists) methods. sub local { bless shift, 'Fripost::Schema::Local'; } +sub pending { bless shift, 'Fripost::Schema::Pending'; } =back @@ -98,23 +99,6 @@ under the same terms as perl itself. =cut -sub _dn2fvu { - my $self = shift; - my $dn = ldap_explode_dn(shift); - - return '@'. $dn->[0]->{fvd} if exists $dn->[0]->{fvd}; - return $dn->[0]->{fvu} .'@'. $dn->[1]->{fvd}; -} -sub _fvu2dn { - my $self = shift; - my $email = shift; - my ($l,$d) = split_addr($email); - - my @dn = ({fvd => $d}, @{$self->suffix}); - unshift @dn, {fvu => $l} if defined $l and $l ne ''; - canonical_dn( @dn ); -} - 1; __END__ -- cgit v1.2.3