summary refs log tree commit diff
path: root/lib/MooseX/Net/API/Meta/Method.pm
diff options
context:
space:
mode:
authorfranck cuny <franck@lumberjaph.net>2010-06-03 14:11:54 +0200
committerfranck cuny <franck@lumberjaph.net>2010-06-03 14:11:54 +0200
commitc94d18646c9116502cfb212de1ab9f8df2377b90 (patch)
tree8616e6480f759fcc73a3722443671708434f63ee /lib/MooseX/Net/API/Meta/Method.pm
parentremove -d, add uploadtocpan (diff)
downloadmoosex-net-api-c94d18646c9116502cfb212de1ab9f8df2377b90.tar.gz
rename some methods
Diffstat (limited to '')
-rw-r--r--lib/MooseX/Net/API/Meta/Method.pm9
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 {