KOBAYASHI, Hiroaki

NAME

MOP4Import::Declare::Type - inner-type related pragmas

SYNOPSIS

  package MyApp;
  use MOP4Import::Declare::Type
    [type => BaseUser => [fields => qw/sessid/]
      , [subtypes =>
            Guest => []
          , RegisteredUser => [[fields => qw/uid registered_at/]]
        ]
    ];

DESCRIPTION

This module provides inner-type related pragmas. Usually used via MOP4Import::Types.

PRAGMAS

[type => $typename, @spec]

Declare inner-type $typename based on given @spec.

[extend => $typename, @spec]

Declare extended version of $typename, which is inherited from parent class, based on given @spec.

[subtypes => ($typename => [@spec])...]

Declare multiple inner-types from given $typename => [@spec] pair list.

AUTHOR

Kobayashi, Hiroaki <hkoba@cpan.org>

LICENSE

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