From 56d64d03d58de1f42acf11456b49f5d3dbcfdabe Mon Sep 17 00:00:00 2001 From: Will Budic Date: Wed, 24 Sep 2025 19:42:12 +1000 Subject: [PATCH] fix, introduced wrong logic to set recursing flag. --- system/modules/CNFParser.pm | 6 ++++-- tests/testSQLPostgres_on_elite.pl | 6 ++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/system/modules/CNFParser.pm b/system/modules/CNFParser.pm index 29ab41d..5ab9d59 100644 --- a/system/modules/CNFParser.pm +++ b/system/modules/CNFParser.pm @@ -880,11 +880,13 @@ sub parse { my ($self, $cnf_file, $content, $del_keys) = @_; or CNFParserException->throw(error=>"Can't open $cnf_file -> $!",show_trace=>$self->{STACK_TRACE}); read $fh, $content, -s $fh; close $fh; - if(!$self->{CNF_CONTENT} eq 'script'){ + if(exists $self->{CNF_CONTENT} && $self->{CNF_CONTENT} eq 'script'){ + $recursing = 1 + }else{ my @stat = stat($cnf_file); $self->{CNF_STAT} = \@stat; $self->{CNF_CONTENT} = $CUR_SCRIPT = $cnf_file; - }else{$recursing = 1} + } }else{ my $type = Scalar::Util::reftype($content); if($type && $type eq 'ARRAY'){ diff --git a/tests/testSQLPostgres_on_elite.pl b/tests/testSQLPostgres_on_elite.pl index 5e2fcbc..ae9133c 100644 --- a/tests/testSQLPostgres_on_elite.pl +++ b/tests/testSQLPostgres_on_elite.pl @@ -3,7 +3,7 @@ use warnings; use strict; use Syntax::Keyword::Try; use Benchmark; use lib "tests"; -use lib '/home/will/dev_new/PerlCNF/system/modules'; +use lib 'system/modules'; # use lib "system/modules"; require TestManager; @@ -85,7 +85,7 @@ sub decodeQuotes{ $cnf->warn('Skipping SQL Statement for CMD_HISTORY, table exists!'); } - my @his_hosts = $cnf -> collection('@HISTORY_HOSTS___'); + my @his_hosts = $cnf -> collection('@HISTORY_HOSTS'); my @entries_by_ord; my $ord = 0; if(!@his_hosts){ @@ -106,8 +106,6 @@ There is: * Load and ~/.config/this_script_name.cnf **/ <<>> - - ) } -- 2.34.1