The Perl and Raku Conference 2025: Greenville, South Carolina - June 27-29 Learn more

NAME

Function::Interface::Info - information about interface package

SYNOPSIS

package IFoo {
fun hello(Str $msg) :Return(Str);
}
my $info = Function::Interface::info 'IFoo';
$info->package; # IFoo
$info->functions; # [ Function::Interface::Info::Function ]
for my $finfo (@{$info->functions}) {
$finfo->subname; # hello
$finfo->keyword; # fun
$finfo->params; # [ Function::Interface::Info::Function::Param ]
$finfo->return; # [ Function::Interface::Info::Function::ReturnParam ]
for my $pinfo (@{$finfo->params}) {
$pinfo->type; # Str
$pinfo->name; # $msg
$pinfo->named; # false
$pinfo->optional; # false
}
for my $rinfo (@{$rinfo->return}) {
$rinfo->type; # Str
}
}

DESCRIPTION

Function::Interface::info returns objects of this class to describe interface package.

METHODS

new

Constructor of Function::Interface::Info. This is usually called at Function::Interface::info.

$info->package

Returns interface package name

$info->functions

Returns a list of Function::Interface::Info::Function

SEE ALSO

Function::Interface