This version has reached its end of life and is out of support. Please contact us for upgrade assistance.
RT::Interface::CLI - helper functions for creating a commandline RT interface
use lib "/path/to/rt/libraries/"; use RT::Interface::CLI qw(CleanEnv GetCurrentUser GetMessageContent loc); #Clean out all the nasties from the environment CleanEnv(); #let's talk to RT' use RT; #Load RT's config file RT::LoadConfig(); # Connect to the database. set up loggign RT::Init(); #Get the current user all loaded my $CurrentUser = GetCurrentUser(); print loc('Hello!'); # Synonym of $CuurentUser->loc('Hello!');
Removes some of the nastiest nasties from the user's environment.
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().
Takes two arguments a source file and a boolean "edit". If the source file is undef or "", assumes an empty file. Returns an edited file as an array of lines.← Back to index