diff options
author | franck cuny <franck@lumberjaph.net> | 2010-06-03 14:11:54 +0200 |
---|---|---|
committer | franck cuny <franck@lumberjaph.net> | 2010-06-03 14:11:54 +0200 |
commit | c94d18646c9116502cfb212de1ab9f8df2377b90 (patch) | |
tree | 8616e6480f759fcc73a3722443671708434f63ee /lib/MooseX/Net/API/Role | |
parent | remove -d, add uploadtocpan (diff) | |
download | moosex-net-api-c94d18646c9116502cfb212de1ab9f8df2377b90.tar.gz |
rename some methods
Diffstat (limited to '')
-rw-r--r-- | lib/MooseX/Net/API/Role/Authentication.pm | 6 | ||||
-rw-r--r-- | lib/MooseX/Net/API/Role/Format.pm | 4 | ||||
-rw-r--r-- | lib/MooseX/Net/API/Role/Request.pm | 2 | ||||
-rw-r--r-- | lib/MooseX/Net/API/Role/UserAgent.pm | 2 |
4 files changed, 7 insertions, 7 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(@_) }); diff --git a/lib/MooseX/Net/API/Role/Format.pm b/lib/MooseX/Net/API/Role/Format.pm index e766161..37956bb 100644 --- a/lib/MooseX/Net/API/Role/Format.pm +++ b/lib/MooseX/Net/API/Role/Format.pm @@ -23,7 +23,7 @@ has api_format => ( lazy => 1, default => sub { my $self = shift; - $self->meta->get_option('api_format'); + $self->meta->get_api_option('api_format'); } ); @@ -33,7 +33,7 @@ has api_format_mode => ( lazy => 1, default => sub { my $self = shift; - my $mode = $self->meta->get_option('api_format_mode'); + my $mode = $self->meta->get_api_option('api_format_mode'); $mode || 'append'; } ); diff --git a/lib/MooseX/Net/API/Role/Request.pm b/lib/MooseX/Net/API/Role/Request.pm index 214411c..3b97da6 100644 --- a/lib/MooseX/Net/API/Role/Request.pm +++ b/lib/MooseX/Net/API/Role/Request.pm @@ -12,7 +12,7 @@ has api_base_url => ( lazy => 1, default => sub { my $self = shift; - my $api_base_url = $self->meta->get_option('api_base_url'); + my $api_base_url = $self->meta->get_api_option('api_base_url'); if (!$api_base_url) { die MooseX::Net::API::Error->new( reason => "'api_base_url' have not been defined"); diff --git a/lib/MooseX/Net/API/Role/UserAgent.pm b/lib/MooseX/Net/API/Role/UserAgent.pm index c3a1d5b..c21628a 100644 --- a/lib/MooseX/Net/API/Role/UserAgent.pm +++ b/lib/MooseX/Net/API/Role/UserAgent.pm @@ -9,7 +9,7 @@ has api_useragent => ( lazy => 1, default => sub { my $self = shift; - my $ua = $self->meta->get_option('useragent'); + my $ua = $self->meta->get_api_option('useragent'); return $ua->() if $ua; $ua = LWP::UserAgent->new(); $ua->agent( |