[interchange-cvs] interchange - heins modified lib/Vend/Util.pm
interchange-cvs at icdevgroup.org
interchange-cvs at icdevgroup.org
Tue Jun 12 12:27:33 EDT 2007
User: heins
Date: 2007-06-12 16:27:33 GMT
Modified: lib/Vend Util.pm
Log:
* Remove inefficient tests for template tags, setting the whole
debug info array except for the caller() ones.
Revision Changes Path
2.104 +8 -17 interchange/lib/Vend/Util.pm
rev 2.104, prev_rev 2.103
Index: Util.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Util.pm,v
retrieving revision 2.103
retrieving revision 2.104
diff -u -r2.103 -r2.104
--- Util.pm 12 Jun 2007 15:55:49 -0000 2.103
+++ Util.pm 12 Jun 2007 16:27:33 -0000 2.104
@@ -1,6 +1,6 @@
# Vend::Util - Interchange utility functions
#
-# $Id: Util.pm,v 2.103 2007/06/12 15:55:49 mheins Exp $
+# $Id: Util.pm,v 2.104 2007/06/12 16:27:33 mheins Exp $
#
# Copyright (C) 2002-2005 Interchange Development Group
# Copyright (C) 1996-2002 Red Hat, Inc.
@@ -88,7 +88,7 @@
use Vend::File;
use subs qw(logError logGlobal);
use vars qw($VERSION @EXPORT @EXPORT_OK);
-$VERSION = substr(q$Revision: 2.103 $, 10);
+$VERSION = substr(q$Revision: 2.104 $, 10);
my $Eval_routine;
my $Eval_routine_file;
@@ -1645,21 +1645,11 @@
my %debug;
$tpl = POSIX::strftime($tpl, localtime());
$tpl =~ s/\s*$/\n/;
- if($tpl =~ /\{page\}/i) {
- $debug{page} = $Global::Variable->{MV_PAGE};
- }
- if($tpl =~ /\{tag\}/i) {
- $debug{tag} = $Vend::CurrentTag;
- }
- if($tpl =~ /\{host\}/i) {
- $debug{host} = $CGI::host || $CGI::remote_addr;
- }
- if($tpl =~ /\{catalog\}/i) {
- $debug{catalog} = $Vend::Catalog;
- }
- if($tpl =~ /\{remote_addr\}/i) {
- $debug{host} = $CGI::host || $CGI::remote_addr;
- }
+ $debug{page} = $Global::Variable->{MV_PAGE};
+ $debug{tag} = $Vend::CurrentTag;
+ $debug{host} = $CGI::host || $CGI::remote_addr;
+ $debug{remote_addr} = $CGI::remote_addr;
+ $debug{catalog} = $Vend::Catalog;
if($tpl =~ /\{caller\d+\}/i) {
my @caller = caller();
for(my $i = 0; $i < @caller; $i++) {
@@ -1667,6 +1657,7 @@
}
}
$debug{message} = errmsg(@_);
+
print Vend::Interpolate::tag_attr_list($tpl, \%debug, 1);
}
else {
More information about the interchange-cvs
mailing list