RT::Interface::CLI - helper functions for creating a commandline RT interface
use lib "/opt/rt4/local/lib", "/opt/rt4/lib"; use RT::Interface::CLI qw(GetCurrentUser Init loc); # Process command-line arguments, load the configuration, and connect # to the database Init(); # Get the current user all loaded my $CurrentUser = GetCurrentUser(); print loc('Hello!'); # Synonym of $CurrentUser->loc('Hello!');
Figures out the uid of the current user and returns an RT::CurrentUser object loaded with that user. if the current user isn't found, returns a copy of RT::Nobody.
Synonym of $CurrentUser->loc().
It sets the
LogToSTDERR setting to
warning, to ensure that the user sees all relevant warnings. It also adds
--verbose options, which adjust the
LogToSTDERR value to
debug is provided as a parameter, it added as an alias for