Advanced-Config

 view release on metacpan or  search on metacpan

t/config/30-alt_symbols_03.cfg  view on Meta::CPAN

?
? This is just a sample config file that I'm using as a basis.
? It's validated by t/30-alt_symbols_cfg.t
?
? Any changes made to this config file should also be refleced
? in:  t/config/10-simple.cfg
? That config file is used to validate this one!
?
? --------------------------------------------------------------
?   The required substitutions ...
?     Assignment (=)     ==>  :=
?     Comments   (#)     ==>  ?
?     Variables (${..})  ==>  $[..]
?     Quotes    (' or ") ==>  @..@
? --------------------------------------------------------------

section_03 := This is a long section name!
section_04 := This is an empty section!

[ $[section_04] ]

[ $[section_03] ]

a := @A is for Apple!@

           b       :=       B is for Bat!    ? A comment

c:=@C is for Cat!@    ? Another comment

? Another comment ...
d :=D is for Dog!     ? Comment (????) ...

e := @E is for Elephant!@

f := 'F is for Frog!"   ? Unbalanced Quotes are not removed. (can't implement)

g := G is for Gold Fish!

g := $fooled you        ? Not a variable substitution!

h_pwd := @Hello World!@    ? Should@t appear in fish.

? --------------------------------------------------------------

one := ONE
two := TWO
three := THREE

? All 3 evaluate to the same value ...
number 1 := @$[one] $[two] $[three]@
number 2 := @$[one] $[two] $[three]@
number 3 :=  $[one] $[two] $[three]

? All 3 evaluate to the same value again ...
number 6 := @$[one] $[two] $[three]@    ? A comment ...
number 5 := @$[one] $[two] $[three]@    ? A comment ...
number 4 :=  $[one] $[two] $[three]     ? A comment ...

number 8 := $[number 1]

rule8 missing := $[undefined]    ? Returns @@ as it@s value.

? Testing the special variables ... (Rule 0)
shft3 := @zzzzzzzzz@         ? Line should be ignored!

cmt  := $[shft3]
cmt2 := $[shft33]
cmt3 := $[shft333]

? Look up these 3 special perl variables ... (Rule 5)
rule5_pid  := $[$]          ? Different per test ...
rule5_prog := $[0]
rule5_os   := $[^O]

? Look up these special variables ... (Rule 6)
rule6_host := $[hostname]
rule6_user := $[user]
rule6_pid  := $[PID]       ? Should match $[rule5_pid]
rule6_ppid := $[PPID]      ? Different per test ...
rule6_p    := $[program]
rule6_sep  := $[sep]       ? Varies by OS

? Here are some dates we are interested in!

? The date keywords use rule 7 ... So mixes rule 6 & 7.
log1 := t$[sep]logs$[sep]$[program].$[today].txt
log2 := t$[sep]logs$[sep]$[program].$[yesterday].txt
log3 := t$[sep]logs$[sep]$[program].$[tomorrow].txt

? Here are some strange variables to see what happens!
empty_1 := $[]
empty_2 := $[   ]

empty_3 := abc $[] xyz
empty_4 := abc $[   ] xyz



( run in 1.755 second using v1.01-cache-2.11-cpan-8dfa8b56332 )