RT-Client-CLI

 view release on metacpan or  search on metacpan

script/rt  view on Meta::CPAN

use HTTP::Headers;
use Term::ReadLine;
use Time::Local; # used in prettyshow
use File::Temp;

# We derive configuration information from hardwired defaults, dotfiles,
# and the RT* environment variables (in increasing order of precedence).
# Session information is stored in ~/.rt_sessions.

my $VERSION = 0.02;
my $HOME = eval{(getpwuid($<))[7]}
           || $ENV{HOME} || $ENV{LOGDIR} || $ENV{HOMEPATH}
           || ".";
my %config = (
    (
        debug        => 0,
        user         => eval{(getpwuid($<))[0]} || $ENV{USER} || $ENV{USERNAME},
        passwd       => undef,
        server       => 'http://localhost/',
        query        => "Status!='resolved' and Status!='rejected'",
        orderby      => 'id',
        queue        => undef,
# to protect against unlimited searches a better choice would be
#       queue        => 'Unknown_Queue',
        auth         => "rt",
    ),
    config_from_file($ENV{RTCONFIG} || ".rtrc"),



( run in 0.236 second using v1.01-cache-2.11-cpan-8d75d55dd25 )