[open-ils-commits] r17320 - branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/WWW (atz)

svn at svn.open-ils.org svn at svn.open-ils.org
Mon Aug 23 18:27:50 EDT 2010


Author: atz
Date: 2010-08-23 18:27:43 -0400 (Mon, 23 Aug 2010)
New Revision: 17320

Modified:
   branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/WWW/Web.pm
Log:
Perltidy

death to tabs

Modified: branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/WWW/Web.pm
===================================================================
--- branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/WWW/Web.pm	2010-08-23 22:27:41 UTC (rev 17319)
+++ branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/WWW/Web.pm	2010-08-23 22:27:43 UTC (rev 17320)
@@ -1,11 +1,12 @@
 package OpenILS::WWW::Web;
-use strict; use warnings;
+use strict;
+use warnings;
 
 use Apache2::Log;
 use Apache2::Const -compile => qw(OK REDIRECT :log);
-use APR::Const    -compile => qw(:error SUCCESS);
+use APR::Const     -compile => qw(:error SUCCESS);
 use Apache2::RequestRec ();
-use Apache2::RequestIO ();
+use Apache2::RequestIO  ();
 use Apache2::RequestUtil;
 
 #use CGI ();
@@ -14,81 +15,84 @@
 use OpenSRF::EX qw(:try);
 use OpenSRF::System;
 
-my $main_ttk = "opac/logic/page_router.ttk";
-my $error_ttk = "opac/pages/error.ttk";
-my $init_ttk = "opac/logic/page_init.ttk";
-my $bootstrap = "SYSCONFDIR/opensrf_core.xml";
+my $main_ttk       = "opac/logic/page_router.ttk";
+my $error_ttk      = "opac/pages/error.ttk";
+my $init_ttk       = "opac/logic/page_init.ttk";
+my $bootstrap      = "SYSCONFDIR/opensrf_core.xml";
 my $child_init_ttk = "opac/logic/child_init.ttk";
 
-my $includes = [];  # [  '/pines/cvs/ILS/Open-ILS/src/templates' ];
+my $includes = [];    # [  '/pines/cvs/ILS/Open-ILS/src/templates' ];
 
 sub import {
-	my( $self, $tdir ) = @_;
-	$includes = [ $tdir ];
+    my ( $self, $tdir ) = @_;
+    $includes = [$tdir];
 }
 
-
-
 my $plugin_base = 'OpenILS::Template::Plugin';
 
 sub handler {
 
-	my $apache = shift;
-	print "Content-type: text/html; charset=utf-8\n\n";
+    my $apache = shift;
+    print "Content-type: text/html; charset=utf-8\n\n";
 
-	_process_template(
-			apache		=> $apache,
-			template		=> $main_ttk,
-			pre_process	=> $init_ttk );
+    _process_template(
+        apache      => $apache,
+        template    => $main_ttk,
+        pre_process => $init_ttk
+    );
 
-	return Apache2::Const::OK;
+    return Apache2::Const::OK;
 }
 
 sub child_init_handler {
-	_process_template(  template => $child_init_ttk );
+    _process_template( template => $child_init_ttk );
 }
 
 sub _process_template {
 
-	my %params = @_;
-	my $ttk				= $params{template}		|| return undef;
-	my $apache			= $params{apache}			|| undef;
-	my $pre_process	= $params{pre_process}	|| undef;
-	my $param_hash		= $params{params}			|| {};
+    my %params      = @_;
+    my $ttk         = $params{template}    || return undef;
+    my $apache      = $params{apache}      || undef;
+    my $pre_process = $params{pre_process} || undef;
+    my $param_hash  = $params{params}      || {};
 
-	my $template;
+    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,
-		} 
-	);
+    $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 {
+    try {
 
-		if( ! $template->process( $ttk, $param_hash ) ) { 
-			warn  "Error Occured: " . $template->error();
-			my $err = $template->error();
-			$err =~ s/\n/\<br\/\>/g;
-			warn "Error processing template $ttk\n";	
-			my $string =  "<br><b>Unable to process template:<br/><br/> " . $err . "!!!</b>";
-			$template->process( $error_ttk , { error => $string } );
-		}
+        if ( !$template->process( $ttk, $param_hash ) ) {
+            warn "Error Occured: " . $template->error();
+            my $err = $template->error();
+            $err =~ s/\n/\<br\/\>/g;
+            warn "Error processing template $ttk\n";
+            my $string =
+                "<br><b>Unable to process template:<br/><br/> " 
+              . $err
+              . "!!!</b>";
+            $template->process( $error_ttk, { error => $string } );
+        }
 
-	} catch Error with {
-		my $e = shift;
-		warn "Error processing template $ttk:  $e - $@ \n";	
-		print "<center><br/><br/><b>Error<br/><br/> $e <br/><br/> $@ </b><br/></center>";
-		return;
-	};
+    }
+    catch Error with {
+        my $e = shift;
+        warn "Error processing template $ttk:  $e - $@ \n";
+        print "<center><br/><br/><b>Error<br/><br/> $e <br/><br/> $@ </b><br/></center>";
+        return;
+    };
 
 }
 
-
 1;



More information about the open-ils-commits mailing list