develooper Front page | perl.moose | Postings from September 2014

Re: Coerce and messages

Thread Previous | Thread Next
From:
Karen Etheridge
Date:
September 28, 2014 23:52
Subject:
Re: Coerce and messages
Message ID:
20140928235221.GF73734@tequila
On Sun, Sep 28, 2014 at 01:27:53PM -0700, Bill Moseley wrote:
> I'm going to build a request with HTTP::Request::Common and want to use its
> existing methods (POST, PUT, GET, etc.)
> 
> I'm curious how to control the error message better when coercing.

I'm lost - what is the advantage to storing the HTTP request method as a
subref, vs. as a string?

this may be of use for your validation check:
https://metacpan.org/pod/MooseX::Types::HTTPMethod


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About