From Code to Community: Sponsoring The Perl and Raku Conference 2025 Learn more

NAME

Class::Component::Component::Moosenize - you can Moose like Plugin code

SYNOPSIS

EXPORT METHODS

requires, with
package MyApp;
__PACKAGE__->load_components(qw/ Moosenize /);
package MyApp::Plugin;
requires 'foo';
requires bar => ['Method'], baz => ['+Foo::MyAttribute'];
requires hop => +{ Method => 'jump' };
package MyApp::Role;
requires 'blah';
use base qw( MyApp::Plugin );
sub foo { # simple method
}
sub bar { # same "sub bar :Method {"
}
sub baz { # same "sub baz :+Foo::MyAttribute {"
}
sub hop { # same "sub hop :Method('jump') {"
}
sub blah { # simple method
}
before after around

See also Moose and Moose::Role

AUTHOR

Kazuhiro Osawa <ko@yappo.ne.jp>

SEE ALSO

Class::Component, Moose, Moose::Role, Class::MOP

LICENSE

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