Cory G Watson > MooseX-Method-0.44 > MooseX::Meta::Signature::Named

Download:
MooseX-Method-0.44.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  0
View/Report Bugs
Module Version: 0.01   Source  

NAME ^

MooseX::Meta::Signature::Named - Named signature metaclass

WARNING ^

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

SYNOPSIS ^

  use MooseX::Meta::Signature::Named;

  my $signature = MooseX::Meta::Signature::Named->new (
    foo => { required => 1 },
    bar => { required => 1 },
  );

  my $results;

  eval {
    $results = $signature->validate (foo => 1);
  };

  print Dumper($signature->export);

METHODS ^

validate

Validate the arguments against the signature. Accepts arguments in the form of a hashref or a hash. Returns a hashref of the validated arguments or throws an exception on validation error.

export

Exports a data structure representing the signature.

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.

syntax highlighting: