NAME
Algorithm::Classifier::IsolationForest::App::Command - base class for the iforest subcommands
DESCRIPTION
Every iforest subcommand inherits from this. App::Cmd finds it by name alone -- Algorithm::Classifier::IsolationForest::App's -app setup looks for <app class>::Command -- so the command modules never mention it.
It earns its keep through "validate_args", which makes -h print a command's help instead of being validated like any other flag.
METHODS
global_opt_spec
Option-spec hook delegating to an options method on the command, taking the App::Cmd application object and returning whatever that method returns.
Nothing reaches this in practice: App::Cmd calls global_opt_spec on the application class rather than on the command base, and no command here defines options -- they all use App::Cmd's own opt_spec. Calling it would die on the missing method.
validate_args
App::Cmd's per-command validation hook, wrapped so -h short-circuits it. Without this, -h would fall through to the command's own validate and trip over whatever required options the user has not typed yet -- which is exactly the moment they are reaching for the help.
Takes the parsed options hashref and the arrayref of remaining arguments, and returns whatever the command's validate returns. Under -h it does not return at all: the help command runs and the process exits.
iforest predict -h # prints predict's help, exits