NAME

MooseX::Meta::Parameter - Parameter metaclass

WARNING

This API is unstable, it may change at any time. This should not affect ordinary MooseX::Method use.

SYNOPSIS

use MooseX::Meta::Parameter;

my $parameter = MooseX::Meta::Parameter->new (isa => 'Int');

my $result;

eval {
  $result = $parameter->validate ("foo");
};

if ($@) {
  print "God help us all!\n";
} else {
  print "Your argument: $result\n";
}

METHODS

validate

Takes an argument, validates it, and returns the argument or possibly a coerced version of it. Exceptions are thrown on validation failure.

BUGS

Most software has bugs. This module probably isn't an exception. If you find a bug please either email me, or add the bug to cpan-RT.

AUTHOR

Anders Nor Berle <debolaz@gmail.com>

COPYRIGHT AND LICENSE

Copyright 2007 by Anders Nor Berle.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.