diff options
Diffstat (limited to 'lib/MooseX/Net/API/Role/Authentication.pm')
-rw-r--r-- | lib/MooseX/Net/API/Role/Authentication.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/MooseX/Net/API/Role/Authentication.pm b/lib/MooseX/Net/API/Role/Authentication.pm index 0b6de69..7f741b3 100644 --- a/lib/MooseX/Net/API/Role/Authentication.pm +++ b/lib/MooseX/Net/API/Role/Authentication.pm @@ -20,12 +20,12 @@ after BUILDALL => sub { for (qw/api_username api_password/) { my $predicate = 'has_' . $_; - my $value = $self->meta->get_option($_); + my $value = $self->meta->get_api_option($_); $self->$_($value) if $value && !$self->$predicate; } - if (my $has_auth = $self->meta->get_option('authentication')) { - my $auth_method = $self->meta->get_option('authentication_method'); + if (my $has_auth = $self->meta->get_api_option('authentication')) { + my $auth_method = $self->meta->get_api_option('authentication_method'); if ($auth_method) { $self->api_useragent->add_handler( request_prepare => sub { $self->$auth_method(@_) }); |