From cee13f4a2454714afdb9f818b5068a4e92e8aa0a Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Mon, 28 Jan 2008 19:01:24 +0000 Subject: [PATCH] fix variable assignment inside of conditional, according to perlcritic --- lib/WebGUI/Macro/AssetProxy.pm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/WebGUI/Macro/AssetProxy.pm b/lib/WebGUI/Macro/AssetProxy.pm index 52ef0b2a2..7a25848d9 100644 --- a/lib/WebGUI/Macro/AssetProxy.pm +++ b/lib/WebGUI/Macro/AssetProxy.pm @@ -33,13 +33,15 @@ can be found, an internationalized error message will be returned instead. No editing controls (toolbar) will be displayed in the Asset output, even if Admin is turned on. +The Not Found Page may not be Asset Proxied. + =cut #------------------------------------------------------------------- sub process { - my $session = shift; - my $url = shift; - my $t = [Time::HiRes::gettimeofday()] if ($session->errorHandler->canShowPerformanceIndicators()); + my $session = shift; + my $url = shift; + my $t = ($session->errorHandler->canShowPerformanceIndicators()) ? [Time::HiRes::gettimeofday()] : undef; my $asset = WebGUI::Asset->newByUrl($session,$url); #Sorry, you cannot proxy the notfound page. if (defined $asset && $asset->getId ne $session->setting->get("notFoundPage")) {