From: wbudic Date: Wed, 15 Dec 2021 02:41:19 +0000 (+1100) Subject: inbuilt $_ is not getting the parameter each time. X-Git-Url: https://lifelog.hopto.org/gitweb/?a=commitdiff_plain;h=4952ee0373b4b19e6eee71595d228c1f7d5e71af;p=LifeLog.git inbuilt $_ is not getting the parameter each time. --- diff --git a/htdocs/cgi-bin/main.cgi b/htdocs/cgi-bin/main.cgi index 39fe93d..968f42c 100755 --- a/htdocs/cgi-bin/main.cgi +++ b/htdocs/cgi-bin/main.cgi @@ -3,9 +3,12 @@ # Programed by: Will Budic # Open Source License -> https://choosealicense.com/licenses/isc/ # +use v5.15; +#use diagnostics; use warnings; use strict; use experimental qw( switch ); +no warnings 'experimental'; use Exception::Class ('LifeLogException'); use Syntax::Keyword::Try; use DBI; @@ -61,10 +64,10 @@ my $rs_prev = param('rs_prev'); my $rs_cur = param('rs_cur'); my $rs_page = param('rs_page'); sub param{ - $_ = $cgi->param(shift); return 0 if !$_; + my $v = $cgi->param(shift); return 0 if !$v;$v } sub session{ - $_ = $sss->param(shift); return 0 if !$_; + my $v = $sss->param(shift); return 0 if !$v;$v } if(Settings::anon('^VW_OVR_WHERE')){ @@ -92,7 +95,7 @@ my ($BUFFER, $D_BUFF)=("",""); my $lang = Date::Language->new(Settings::language()); my $today = Settings->today(); -# We buffer the whole page creation, for speed and control send compressed or not to client. +# We buffer the whole page creation, for speed and control, or to send compressed or not to client. sub toBuf { if($DEBUG){$D_BUFF .= shift}else{$BUFFER .= shift} } if(!$prm_vc && &Settings::keepExcludes){ @@ -375,7 +378,7 @@ qq(
my $re_a_tag = qr/.*<\/a>/si; my $regex = 'REGEXP'; $regex = ') ~' if Settings::isProgressDB(); my $isInViewMode = rindex ($sqlVWL, 'PID<=') > 0 || rindex ($sqlVWL, 'ID_CAT=') > 0 || $prm_aa || rindex ($sqlVWL, $regex)>0 || $prm_rtf; - toBuf $cgi->pre("###[Session PARAMS->isV:$isInViewMode|vc=$prm_vc|xc=$prm_xc|aa: $prm_aa|xc_lst=$prm_xc_lst|\@xc_lst=@xc_lst|vrtf=$prm_rtf|keepExcludes=".&Settings::keepExcludes."] -> ".$sqlVWL) if $DEBUG; + toBuf $cgi->pre("###[Session PARAMS->isV:$isInViewMode|vc=$prm_vc|xc=$prm_xc|aa: $prm_aa|xc_lst=$prm_xc_lst|\@xc_lst=@xc_lst|vrtf=$prm_rtf|keepExcludes=".&Settings::keepExcludes."] -> ".$sqlVWL) if $DEBUG; if ( $log_start > 0 ) { @@ -526,9 +529,8 @@ sub buildLog { #Replace with a full link an HTTP URI if ( $log =~ /