NAME
Aion::Meta::RequiresFeature - feature requirement for interfaces
SYNOPSIS
use Aion::Types qw(Str);
use Aion::Meta::RequiresFeature;
use Aion::Meta::Feature;
my $req = Aion::Meta::RequiresFeature->new(
'My::Package', 'name', is => 'rw', isa => Str);
my $feature = Aion::Meta::Feature->new(
'Other::Package',
'name', is => 'rw', isa => Str,
default => 'default_value');
$req->compare($feature);
$req->stringify # => req name => (is => 'rw', isa => Str) of My::Package
DESCRIPTION
Using req creates a requirement for a feature that will be described in the module to which the role will be connected or which will inherit the abstract class.
Only the specified aspects in the feature will be checked.
SUBROUTINES
new ($cls, $pkg, $name, @has)
Constructor.
pkg ()
Returns the name of the package that describes the feature requirement.
name ()
Returns the name of the feature.
has ()
Returns an array with aspects of the feature.
opt ()
Returns a hash of the feature's aspects.
stringify ()
String representation of a feature.
compare ($feature)
Compares with a feature, but only the specified aspects.
AUTHOR
Yaroslav O. Kosmina mailto:dart@cpan.org
LICENSE
⚖ GPLv3
COPYRIGHT
The Aion::Meta::RequiresFeature module is copyright © 2025 Yaroslav O. Kosmina. Rusland. All rights reserved.