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/Meta/Method.pm | |
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/Meta/Method.pm | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/MooseX/Net/API/Meta/Method.pm b/lib/MooseX/Net/API/Meta/Method.pm index 7c388b9..70ae2c8 100644 --- a/lib/MooseX/Net/API/Meta/Method.pm +++ b/lib/MooseX/Net/API/Meta/Method.pm @@ -11,7 +11,7 @@ extends 'Moose::Meta::Method'; subtype UriPath => as 'Str' => where { $_ =~ m!^/! } => message {"path must start with /"}; -enum Method => qw(GET POST PUT DELETE); +enum Method => qw(HEAD GET POST PUT DELETE); has description => (is => 'ro', isa => 'Str'); has method => (is => 'ro', isa => 'Method', required => 1); @@ -46,16 +46,13 @@ has required => ( ); before wrap => sub { - my $class = shift; - my %args = @_; - + my ($class, %args) = @_; $class->_validate_params_before_install(\%args); $class->_validate_required_before_install(\%args); }; sub wrap { - my $class = shift; - my %args = @_; + my ($class, %args) = @_; if (!defined $args{body}) { my $code = sub { |