]> lifelog.hopto.org Git - PerlCNF.git/commitdiff
fix, introduced wrong logic to set recursing flag.
authorWill Budic <redacted>
Wed, 24 Sep 2025 09:42:12 +0000 (19:42 +1000)
committerWill Budic <redacted>
Wed, 24 Sep 2025 09:42:12 +0000 (19:42 +1000)
system/modules/CNFParser.pm
tests/testSQLPostgres_on_elite.pl

index 29ab41df4bfe43953413bfb12a6263548d92b2ab..5ab9d59c0b1c978ff21e91654517aafe5f5aac50 100644 (file)
@@ -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'){
index 5e2fcbc92f22a948ae441d2222bafffa3ffaf5f2..ae9133c51e65423ff71cc7a63d2c23c1b3532c64 100644 (file)
@@ -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
  **/
 <<<FILE $0>>>
-
-
 )
    }