MooseX::Meta::Parameter - Parameter API role


MooseX-Method documentation Contained in the MooseX-Method distribution.

Index


Code Index:

NAME

Top

MooseX::Meta::Parameter - Parameter API role

METHODS

Top

export

Exports a data structure representing the parameter.

WARNING

Top

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

DESCRIPTION

Top

Ensures that the class importing the role conforms to the MooseX::Method parameter API.

BUGS

Top

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

Top

Anders Nor Berle <debolaz@gmail.com>

COPYRIGHT AND LICENSE

Top


MooseX-Method documentation Contained in the MooseX-Method distribution.

package MooseX::Meta::Parameter;

use Moose::Role;

requires qw/validate/;

our $VERSION = '0.01';

our $AUTHORITY = 'cpan:BERLE';

sub export {
  my ($self) = @_;

  my $export = {};

  for (keys %$self) {
    $export->{$_} = $self->{$_} if defined $self->{$_};
  }

  return $export;
}

1;

__END__