Kavorka::TraitFor::ReturnType::doc - Document return types in the signature
Version 0.1105, released 2021-02-28.
# The class use Moops; class My::Class using Moose { method square(Int $integer --> Int does doc('The squared integer.')) { return $integer * $integer; } } # Elsewhere my $return_type = My::Class->meta->get_method('square')->signature->return_types->[0]; say sprintf 'Returns an %s. %s', $return_type->type->name, $return_type->traits->{'doc'}[0]; # says 'Returns an Int. The squared integer.'
Kavorka::TraitFor::ReturnType::doc adds a trait (doc) that is useful for documenting in Moops classes created using Moose.
doc
Kavorka::TraitFor::Parameter::doc
Moops
Kavorka
Moose
https://github.com/Csson/p5-Kavorka-TraitFor-Parameter-doc
https://metacpan.org/release/Kavorka-TraitFor-Parameter-doc
Erik Carlsson <info@code301.com>
This software is copyright (c) 2021 by Erik Carlsson.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Kavorka::TraitFor::Parameter::doc, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Kavorka::TraitFor::Parameter::doc
CPAN shell
perl -MCPAN -e shell install Kavorka::TraitFor::Parameter::doc
For more information on module installation, please visit the detailed CPAN module installation guide.