From 439df9fed364bc111256ee3bad179e39a01f457d Mon Sep 17 00:00:00 2001 From: erickson Date: Mon, 9 Jul 2007 17:50:52 +0000 Subject: [PATCH] removing deprecated JS builder module git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_2@7534 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/WWW/FastJS.pm | 89 ----------------------------- 1 file changed, 89 deletions(-) delete mode 100644 Open-ILS/src/perlmods/OpenILS/WWW/FastJS.pm diff --git a/Open-ILS/src/perlmods/OpenILS/WWW/FastJS.pm b/Open-ILS/src/perlmods/OpenILS/WWW/FastJS.pm deleted file mode 100644 index 3b54c3cc7f..0000000000 --- a/Open-ILS/src/perlmods/OpenILS/WWW/FastJS.pm +++ /dev/null @@ -1,89 +0,0 @@ -package OpenILS::WWW::FastJS; -use strict; use warnings; - -use Apache2 (); -use Apache::Log; -use Apache::Const -compile => qw(OK REDIRECT :log); -use APR::Const -compile => qw(:error SUCCESS); -use Apache::RequestRec (); -use Apache::RequestIO (); -use Apache::RequestUtil; - -use CGI (); -use Template; - -use OpenSRF::EX qw(:try); - - -my $main_ttk = "opac/logic/fastjs.ttk"; -my $init_ttk = "opac/logic/page_init.ttk"; - -my $includes = ['/pines/cvs/ILS/Open-ILS/src/templates']; - -my $plugin_base = 'OpenILS::Template::Plugin'; - -sub handler { - - my $apache = shift; - my $cgi = CGI->new( $apache ); - print "Content-type: text/javascript; charset=utf-8\n\n"; - - my @files = $cgi->param("file"); - warn "INcluding js files @files\n"; - - _process_template( - apache => $apache, - template => $main_ttk, - pre_process => $init_ttk, - files => \@files, - ); - - return Apache::OK; -} - -sub _process_template { - - my %params = @_; - my $ttk = $params{template} || return undef; - my $apache = $params{apache} || undef; - my $pre_process = $params{pre_process} || undef; - my $files = $params{files} || []; - - my $template; - - $template = Template->new( { - OUTPUT => $apache, - ABSOLUTE => 1, - RELATIVE => 1, - PLUGIN_BASE => $plugin_base, - PRE_PROCESS => $pre_process, - INCLUDE_PATH => $includes, - PRE_CHOMP => 1, - POST_CHOMP => 1, - } - ); - - try { - - if( ! $template->process( $ttk, - { files => $files, doc_root => $ENV{"DOCUMENT_ROOT"} } ) ) { - - warn "Error Occured: " . $template->error(); - my $err = $template->error(); - $err =~ s/\n/\/g; - warn "Error processing template $ttk\n"; - my $string = "
Unable to process template:

" . $err . "!!!
"; - #$template->process( $error_ttk , { error => $string } ); - } - - } catch Error with { - my $e = shift; - warn "Error processing template $ttk: $e - $@ \n"; - print "


Error

$e

$@

"; - return; - }; - -} - - -1; -- 2.11.0