MooX::Press::Keywords - handy keywords for MooX::Press
use MooX::Press::Keywords; use MooX::Press ( class => [ 'Leaf' => { has => { 'colour' => { is => rwp, enum => [qw/ green red brown /], default => 'green', }, }, }, 'Tree' => { has => { 'species' => { is => ro, isa => Str, required => true, }, 'foliage' => { is => lazy, isa => '@Leaf', builder => sub { [] }, }, }, }, ], ); no MooX::Press::Keywords;
This is just a quick way of importing:
strict and warnings. (no MooX::Press::Keywords won't unimport these!)
no MooX::Press::Keywords
Types::Standard, Types::Common::Numeric, and Types::Common::String.
true and false boolean constants.
true
false
ro, rw, rwp, lazy, private, and bare string constants.
ro
rw
rwp
lazy
private
bare
blessed from Scalar::Util.
blessed
confess from Carp.
confess
You don't need to use it, but it might save a few lines of boilerplate code, and allow you to use some meaningful barewords instead of quoted strings and numbers.
Please report any bugs to http://rt.cpan.org/Dist/Display.html?Queue=MooX-Press.
MooX::Press.
Toby Inkster <tobyink@cpan.org>.
This software is copyright (c) 2020 by Toby Inkster.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
To install MooX::Press, copy and paste the appropriate command in to your terminal.
cpanm
cpanm MooX::Press
CPAN shell
perl -MCPAN -e shell install MooX::Press
For more information on module installation, please visit the detailed CPAN module installation guide.