Type Coercions (cont.)
- Create our web application
package Web::App; use Moose; # ... use Web::App::Request
- with a request object ...
has 'request' => (is => 'ro', isa => 'Web::App::Request', coerce => 1);
- If we want it to coerce, we use the coerce option.
- Moose does not know how to coerce it yet