Function::Interface::Info - information about interface package
package IFoo { use Function::Interface; 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 } }
Function::Interface::info returns objects of this class to describe interface package.
Constructor of Function::Interface::Info. This is usually called at Function::Interface::info.
Returns interface package name
Returns a list of Function::Interface::Info::Function
Function::Interface
To install Function::Interface, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Function::Interface
CPAN shell
perl -MCPAN -e shell install Function::Interface
For more information on module installation, please visit the detailed CPAN module installation guide.