MooseX::Declare::Syntax::Keyword::Class - Class declarations


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

Index


Code Index:

NAME

Top

MooseX::Declare::Syntax::Keyword::Class - Class declarations

METHODS

Top

generate_export

  CodeRef generate_export ()

This will return a closure doing a call to make_anon_metaclass.

CONSUMES

Top

MODIFIED METHODS

Top

imported_moose_symbols

  List Object->imported_moose_symbols ()

Extends the existing imported_moose_symbols in MooseX::Declare::Syntax::MooseSetup with extends, has, inner and super.

auto_make_immutable

  Bool Object->auto_make_immutable ()

Is set to a true value, so classes are made immutable by default.

make_anon_metaclass

  Object Object->make_anon_metaclass ()

Returns an anonymous instance of Moose::Meta::Class.

SEE ALSO

Top

AUTHORS

Top

COPYRIGHT AND LICENSE

Top


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

package MooseX::Declare::Syntax::Keyword::Class;
BEGIN {
  $MooseX::Declare::Syntax::Keyword::Class::AUTHORITY = 'cpan:FLORA';
}
BEGIN {
  $MooseX::Declare::Syntax::Keyword::Class::VERSION = '0.34';
}
# ABSTRACT: Class declarations

use Moose;

use namespace::clean -except => 'meta';


with qw(
    MooseX::Declare::Syntax::MooseSetup
    MooseX::Declare::Syntax::RoleApplication
    MooseX::Declare::Syntax::Extending
);


around imported_moose_symbols => sub { shift->(@_), qw( extends has inner super ) };


sub generate_export { my $self = shift; sub { $self->make_anon_metaclass } }



around auto_make_immutable => sub { 1 };


around make_anon_metaclass => sub { Moose::Meta::Class->create_anon_class };


1;

__END__