App::vaporcalc::CmdEngine
use App::vaporcalc::CmdEngine; my $eng = App::vaporcalc::CmdEngine->new; my $help = $eng->prepare_cmd( subject => 'help' ); # See App::vaporcalc::Role::UI::ParseCmd, # App::vaporcalc::Role::UI::PrepareCmd, # App::vaporcalc::Role::UI::Cmd, # App::vaporcalc::Cmd::Result
A class containing a valid "subject_list" for use with vaporcalc(1) command handler roles; see "CONSUMES".
The list of valid vaporcalc(1) subjects (as an List::Objects::WithUtils::Array).
Built by scanning classes in the App::vaporcalc::Cmd::Subject:: namespace via Module::Pluggable and collecting the results of calling their respective _subject methods, which must return unique strings that can be transformed into the appropriate class name; see App::vaporcalc::Role::UI::Cmd.
App::vaporcalc::Cmd::Subject::
_subject
Command classes without a subject will produce a warning and be omitted from the subject_list.
subject_list
Rebuilds the "subject_list" by re-scanning the App::vaporcalc::Cmd::Subject:: namespace.
# Current command module search path: $eng->search_path; # Replace the current search path(s): $eng->search_path( new => 'My::vaporcalc::Cmds' ); # Add another search path & rebuild our subject_list: $eng->search_path( add => 'My::vaporcalc::Toys' ); $eng->rebuild_subject_list;
Modify the pluggable command module search path. Imported from Module::Pluggable; see there for details.
After search paths have been modified, "rebuild_subject_list" must be called to load the newly-found modules and regenerate the "subject_list" attribute.
App::vaporcalc::Role::UI::ParseCmd
App::vaporcalc::Role::UI::PrepareCmd
"search_path" in Module::Pluggable
App::vaporcalc::Role::UI::Cmd contains an example command subject in the SYNOPSIS.
Jon Portnoy <avenj@cobaltirc.org>
To install App::vaporcalc, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::vaporcalc
CPAN shell
perl -MCPAN -e shell install App::vaporcalc
For more information on module installation, please visit the detailed CPAN module installation guide.