NAME

Full::Role - common pragmata for modules which provide an OO rôle

SYNOPSIS

package Example::Role;
use Full::Role qw(:v1);

method example;

1;

Method parameter constraints

These use Signature::Attribute::Checked to provide method parameter checks. Note that the extended keyword is required, see Sublike::Extended for more information.

package Example;
use Full::Role qw(:v1);
extended method example ($v :Checked(Num)) { }

Class features

The calling package will be marked as an Object::Pad rôle, providing the "method" in Object::Pad, "has" in Object::Pad and async method keywords, among others.

This also makes available a Log::Any instance in the $log package variable, and for OpenTelemetry support you get $tracer as an OpenTelemetry instance.

It's very likely that future versions will bring in new functionality or enable/disable a different featureset. This behaviour will be controlled through version tags:

use Full::Class qw(:v1);

The latest available version is :v1.

AUTHOR

Original code can be found at https://github.com/deriv-com/perl-Myriad/tree/master/lib/Myriad/Class.pm, by Deriv Group Services Ltd. DERIV@cpan.org. This version has been split out as a way to provide similar functionality.

LICENSE

Released under the same terms as Perl itself.