D
Dave Saville
In chapter 8.16 "Reading configuration files" and using "do" to read
perlish conf files they give the example of overriding a system file
with a user file viz:
do "sysconf";
do "userconf";
They then go on to say "if you want to ignore the system config file
when the user has his own test the return value of the do."
do "sysconf"
or
do "userconf";
Is this not the wrong way around?
My take is that if there is *not* a userconf then the do will silently
fail. So the test needs to run the system file only if there is no
userfile as in
do "userconf" or do "systemconf";
Or have I got it wrong? Although a quick test seems to bear me out.
BTW, it seems one can't use strict when doing this type of thing.
perlish conf files they give the example of overriding a system file
with a user file viz:
do "sysconf";
do "userconf";
They then go on to say "if you want to ignore the system config file
when the user has his own test the return value of the do."
do "sysconf"
or
do "userconf";
Is this not the wrong way around?
My take is that if there is *not* a userconf then the do will silently
fail. So the test needs to run the system file only if there is no
userfile as in
do "userconf" or do "systemconf";
Or have I got it wrong? Although a quick test seems to bear me out.
BTW, it seems one can't use strict when doing this type of thing.