Lim::CLI - The command line interface to Lim
See Lim for version.
use Lim::CLI;
$cli = Lim::CLI->new(...);
This is the CLI that takes the input from the user and sends it to the plugin in question. It uses AnyEvent::ReadLine::Gnu if it is available and that enables command line completion and history functions. It will load all plugins present on the system and use their CLI part if it exists.
Failing to have a supported readline module it will use a basic AnyEvent::Handle to read each line of input and process it.
Built in commands that can not be used by any plugins are:
quit - Will quit the CLI exit - Will exit the relative section or quit the CLI help - Will show help for the relative section where the user is
Create a new Lim::CLI object.
Callback to call when the CLI quits, either with the user doing CTRL-D, CTRL-C or the command 'quit'.
Process a line of input, called from the input watcher (AnyEvent::ReadLine::Gnu or AnyEvent::Handle).
Print the prompt, called from process.
process
Set the prompt, called from process.
Reset the input.
Prints the "unknown command" error if the command can not be found.
Print some output, called from Lim::Component::CLI and here.
Print some output and add a newline, called from Lim::Component::CLI and here.
Print the help for all commands from a plugin.
Called from Lim::Component::CLI when a command was successful.
Called from Lim::Component::CLI when a command issued an error. The error can be a Lim::Error object or list of strings that will be joined to produce an error string.
Call up an editor for the $content provided. Will return the new content if it has changed or undef on error or if nothing was changed.
$content
Will use Lim::Config->{cli}->{editor} which will be the environment variable EDITOR or what ever your configure it to be.
Jerry Lundström, <lundstrom.jerry at gmail.com>
<lundstrom.jerry at gmail.com>
Please report any bugs or feature requests to https://github.com/jelu/lim/issues.
You can find documentation for this module with the perldoc command.
perldoc Lim::CLI
You can also look for information at:
Lim issue tracker (report bugs here)
https://github.com/jelu/lim/issues
Copyright 2012-2013 Jerry Lundström.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
To install Lim, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Lim
CPAN shell
perl -MCPAN -e shell install Lim
For more information on module installation, please visit the detailed CPAN module installation guide.