NAME

Commandable::Command - represent metadata for an invokable command

ACCESSORS

The following simple methods return metadata fields about the command

name

description

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

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

arguments

@args = $command->arguments

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

METHODS

parse_invocation

@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.

AUTHOR

Paul Evans <leonerd@leonerd.org.uk>