X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FPlugin%2FAuthentication%2FStore%2FHtpasswd%2FBackend.pm;h=c0483471765a0407caa91c8709a29bb3285fa457;hb=3e0bbcff879384a81c842abcede0dba6b4314790;hp=c369ffeee9559d3bd2e10a3c350477c79e137127;hpb=e8a7c384d5406c197382271ef873bad2883bbaf6;p=catagits%2FCatalyst-Authentication-Store-Htpasswd.git diff --git a/lib/Catalyst/Plugin/Authentication/Store/Htpasswd/Backend.pm b/lib/Catalyst/Plugin/Authentication/Store/Htpasswd/Backend.pm index c369ffe..c048347 100644 --- a/lib/Catalyst/Plugin/Authentication/Store/Htpasswd/Backend.pm +++ b/lib/Catalyst/Plugin/Authentication/Store/Htpasswd/Backend.pm @@ -6,22 +6,20 @@ use base qw/Class::Accessor::Fast/; use strict; use warnings; -use Apache::Htpasswd; +use Authen::Htpasswd; use Catalyst::Plugin::Authentication::Store::Htpasswd::User; BEGIN { __PACKAGE__->mk_accessors(qw/file/) } sub new { - my ( $class, $file, @extra) = @_; + my ( $class, $file, %extra ) = @_; - bless { file => ( ref($file) ? $file : Apache::Htpasswd->new($file, @extra) ) }, - $class; + bless { file => ( ref $file ? $file : Authen::Htpasswd->new($file, \%extra) ) }, $class; } sub get_user { my ( $self, $id ) = @_; - Catalyst::Plugin::Authentication::Store::Htpasswd::User->new( $id, - $self->file ); + Catalyst::Plugin::Authentication::Store::Htpasswd::User->new( $self->file->lookup_user($id) ); } sub user_supports {