From c94d18646c9116502cfb212de1ab9f8df2377b90 Mon Sep 17 00:00:00 2001 From: franck cuny Date: Thu, 3 Jun 2010 14:11:54 +0200 Subject: rename some methods --- lib/MooseX/Net/API/Meta/Method.pm | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'lib/MooseX/Net/API/Meta/Method.pm') 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 { -- cgit 1.4.1