7 use Apache2::Const -compile => qw(OK REDIRECT :log);
8 use APR::Const -compile => qw(:error SUCCESS);
9 use Apache2::RequestRec ();
10 use Apache2::RequestIO ();
11 use Apache2::RequestUtil;
17 use OpenSRF::EX qw(:try);
23 print "Content-type: text/xml; charset=utf-8\n\n";
27 if (my $fetch = $cgi->param('fetch')) {
31 print LWP::UserAgent->new->get($fetch)->content;
41 my $template = Template->new( {
45 PLUGIN_BASE => 'OpenILS::Template::Plugin',
46 INCLUDE_PATH => ['/openils/var/templates/'],
54 if( ! $template->process( 'opensearch.ttk' ) ) {
55 warn "Error processing template opensearch.ttk\n";
56 warn "Error Occured: " . $template->error();
57 my $err = $template->error();
58 $err =~ s/\n/\<br\/\>/g;
59 print "<br><b>Unable to process template:<br/><br/> " . $err . "!!!</b>";
64 warn "Error processing template opensearch.ttk: $e - $@ \n";
65 print "<center><br/><br/><b>Error<br/><br/> $e <br/><br/> $@ </b><br/></center>";
69 return Apache2::Const::OK;