DOKK / manpages / debian 12 / libcommandable-perl / Commandable::Command.3pm.en
Commandable::Command(3pm) User Contributed Perl Documentation Commandable::Command(3pm)

"Commandable::Command" - represent metadata for an invokable command

The following simple methods return metadata fields about the command

   $name = $command->name
   $desc = $command->description

Strings giving the short name (to be used on a commandline), and descriptive text for the command.

   @args = $command->arguments

A (possibly-empty) list of argument metadata structures.

   @vals = $command->parse_invocation( $cinv )

Parses values out of a Commandable::Invocation instance according to the specification for the command's arguments. Returns a list of perl values suitable to pass into the function implementing the command.

This method will throw an exception if mandatory arguments are missing.

Paul Evans <leonerd@leonerd.org.uk>

2023-01-08 perl v5.36.0