summaryrefslogtreecommitdiff
path: root/lib/MooseX/Net/API/Role/Authentication.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/MooseX/Net/API/Role/Authentication.pm')
-rw-r--r--lib/MooseX/Net/API/Role/Authentication.pm14
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/MooseX/Net/API/Role/Authentication.pm b/lib/MooseX/Net/API/Role/Authentication.pm
index 7859154..06b7e69 100644
--- a/lib/MooseX/Net/API/Role/Authentication.pm
+++ b/lib/MooseX/Net/API/Role/Authentication.pm
@@ -5,14 +5,14 @@ package MooseX::Net::API::Role::Authentication;
use Moose::Role;
has api_username => (
- is => 'rw',
- isa => 'Str',
+ is => 'rw',
+ isa => 'Str',
predicate => 'has_api_username',
);
has api_password => (
- is => 'rw',
- isa => 'Str',
+ is => 'rw',
+ isa => 'Str',
predicate => 'has_api_password',
);
@@ -26,7 +26,9 @@ after BUILDALL => sub {
$self->$_($value) if $value && !$self->$predicate;
}
- if (my $has_auth = $self->meta->get_api_option('authentication')) {
+ if ( $self->meta->get_api_option('authentication')
+ || $self->meta->get_api_option('authentication_method'))
+ {
my $auth_method = $self->meta->get_api_option('authentication_method');
if ($auth_method) {
$self->api_useragent->add_handler(
@@ -61,3 +63,5 @@ after BUILDALL => sub {
=item B<api_username>
=back
+64: hit eof while in pod documentation (no =cut seen)
+ this can cause trouble with some pod utilities