package nzbget::log; use strict; use Apache2::Const -compile => qw(OK); use local::nzbget; use CGI qw(:standard); use URI::Escape; sub handler { print header; use local::menu; my $menu=new local::menu(%ENV); print $menu->start_html('log'); my $cli = new local::nzbget; print CGI::start_table(); my $resp = $cli->send_request('log',0,10) or die "Can't connect to nubget"; die $resp if not ref $resp; foreach my $row (@$resp) { print Tr(td[$row->{Text}]); } print CGI::end_table(); print $menu->end_html; return Apache2::Const::OK; } 1;