NAME

Aion::Meta::RequiresAnyFunction - defines any function that must be in the module

SYNOPSIS

use Aion::Meta::RequiresAnyFunction;

my $any_function = Aion::Meta::RequiresAnyFunction->new(
	pkg => 'My::Package', name => 'my_function'
);

$any_function->stringify # => my_function of My::Package

DESCRIPTION

It is created in requires fn1, fn2... and when initializing the class it is checked that such a function was declared in it using sub or has.

SUBROUTINES

new (%args)

Constructor.

compare ($other)

Checks that $other is a function.

my $any_function = Aion::Meta::RequiresAnyFunction->new(pkg => 'My::Package', name => 'my_function');
eval { $any_function->compare(undef) }; $@  # ~> Requires my_function of My::Package

pkg ()

Returns the name of the package in which the function is declared.

my $any_function = Aion::Meta::RequiresAnyFunction->new(pkg => 'My::Package');
$any_function->pkg  # => My::Package

name ()

Returns the name of the function.

my $any_function = Aion::Meta::RequiresAnyFunction->new(name => 'my_function');
$any_function->name  # => my_function

AUTHOR

Yaroslav O. Kosmina mailto:dart@cpan.org

LICENSE

GPLv3

COPYRIGHT

The Aion::Meta::RequiresAnyFunction module is copyright © 2025 Yaroslav O. Kosmina. Rusland. All rights reserved.