7 use Apache::Const -compile => qw(OK REDIRECT :log);
8 use APR::Const -compile => qw(:error SUCCESS);
9 use Apache::RequestRec ();
10 use Apache::RequestIO ();
11 use Apache::RequestUtil;
15 use Template qw(:template);
17 use OpenSRF::EX qw(:try);
23 print "Content-type: text/xml; charset=utf-8\n\n";
27 if (my $fetch = $cgi->param('fetch')) {
29 print LWP::UserAgent->new->get($fetch)->content;
33 my $template = Template->new( {
37 PLUGIN_BASE => 'OpenILS::Template::Plugin',
38 INCLUDE_PATH => ['/pines/cvs/ILS/Open-ILS/src/extras'],
46 if( ! $template->process( 'opensearch.ttk' ) ) {
47 warn "Error processing template opensearch.ttk\n";
48 warn "Error Occured: " . $template->error();
49 my $err = $template->error();
50 $err =~ s/\n/\<br\/\>/g;
51 print "<br><b>Unable to process template:<br/><br/> " . $err . "!!!</b>";
56 warn "Error processing template opensearch.ttk: $e - $@ \n";
57 print "<center><br/><br/><b>Error<br/><br/> $e <br/><br/> $@ </b><br/></center>";