]> lifelog.hopto.org Git - PerlCNF.git/commitdiff
Impl. see CNFMeta->_import_into_this_package();
authorWill Budic <redacted>
Sun, 9 Nov 2025 01:13:50 +0000 (12:13 +1100)
committerWill Budic <redacted>
Sun, 9 Nov 2025 01:13:50 +0000 (12:13 +1100)
system/modules/CNFParser.pm
system/modules/RSSFeedsPlugin.pm
tests/testCNFMeta.pl
tests/test_CursesProgressBar.pl

index 353b0a350943762c540d49f4718cd2c52bd4c39c..7482de80f45a97a03dfe835e3c00c2fbdf9a3462 100644 (file)
@@ -1053,13 +1053,9 @@ sub parse {  my ($self, $cnf_file, $content, $del_keys) = @_;
                 }
 
             }elsif ($e eq '@'){#collection processing.
-                my $isArray = $t=~ m/^@/;
-                # if(!$v && $t =~ m/(.*)>(\s*.*\s*)/gms){
-                #     $t = $1;
-                #     $v = $2;
-                # }
-                my $IsConstant = ($v =~ s/$meta_const/""/sexi);
-                my @lst = ($isArray?split(/[,\n]/, $v):split('\n', $v)); $_="";
+                my $isArray = $t=~ m/^@/;               
+                my $IsConstant = ($v =~ s/$meta_const/""/sexi);                
+                my @lst = ($isArray?split(DELIMITER(), $v):split('\n', $v));
                 my @props = map {
                         s/^\s+|\s+$//;   # strip unwanted spaces
                         s/^\s*["']|['"]$//g;#strip quotes
index ceee7b7fa7695d5a0e15c9a19157d16b97bacf1f..2f7d06db85cc51fc3a8d2871569bbd18f43d7063 100644 (file)
@@ -19,11 +19,8 @@ use LWP::Simple;
 use Benchmark;
 
 use constant VERSION => '1.1';
+CNFParser::_import_into_this_package();
 
-# require CNFNode;
-# require CNFDateTime;
-
-CNFParser::import();
 our %MHDR  = %CNFMeta::TABLE_HEADER;
 our $TZ;
 
index d72e9dae0b3317a035563bad7f2021f701f054c8..763bb675ec738503d43237dadb039f8099620a50 100644 (file)
@@ -3,7 +3,7 @@ use lib "system/modules";
 
 require TestManager;
 require CNFParser;
-require CNFMeta; CNFMeta->import();
+require CNFMeta; CNFMeta->_import_into_this_package();
 
 my $test = TestManager -> new($0);
 
index 3cfd33e3fad4999dc7e7d53e0e980d4937b78bb5..d6bf38973d94956dfa68c0308f24abb6047d9bf3 100644 (file)
@@ -1,19 +1,15 @@
 #!/usr/bin/env perl
-use warnings; use strict;
+use strict; use warnings; no warnings qw(experimental::signatures);
 use Syntax::Keyword::Try;
-#no critic "eval"
-
-###
-
-use lib::relative "../system/modules";
-    require CNFParser;
-    require CNFDateTime;
-    require CNFScriptToANSIFormatter;
-
-
-use lib "system/modules";
-
-require TestManager;
+use feature 'signatures';
+##
+# Disable bellow use lib::relative when debugging ->  "perl.perlInc" 
+# if set hard linked to vscode project/workspace finds the right folder.
+# 
+ use lib::relative (".","../system/modules");
+##
+use CNFParser;    
+use TestManager;
 my $test = TestManager -> new($0)-> unsuited();
 my $cnf  = CNFParser->blank()->parse(undef,q{
 <<@<@DIRECTORIES>
@@ -49,7 +45,6 @@ localperl
 
 use lib "/home/will/dev_new/web_imports_cloned/CPAN/Curses-UI-0.9609/lib";
 use Curses::UI;
-#use Time::HiRes qw(usleep);
 use feature 'say';
 use File::Type;
 
@@ -80,8 +75,7 @@ package FileCollected {
 
 }
 
-sub isExcluded{
-    my $path = shift;
+sub isExcluded($path){    
     foreach my $exclude(@EXCLUDE_KEYS){
         if($path =~  m/$exclude/){
            return 1 if $EXCLUDE_RULES{$exclude} -> ($path,$exclude)