[Pdx-pm] Hiding Perlish Churlishness from App users

Keith Lofstrom keithl at kl-ic.com
Thu Feb 3 12:18:48 PST 2005

"Perlish Churlishness"?  THAT should get people's attention.

The dirvish app I talked about last month exposes a lot of Perlishness
to the user of the program.  For example, in the config file, setting
the option 'foo' to the string 'false' makes it logically TRUE, because
the underlying program uses the option value as a Perl logical without
further processing.  This upsets some users, and that upsets me - users
have enough details to worry about without getting picayune.

I am thinking of adding a line to dirvish that does this:

for ( @BOOLEAN_FIELDS ) { $$Options{ $_ } =~ s/(false|off|no)/0/i }

(yes, we already have the array and the hash reference )

... which allows users to use 'FALSE' and 'False' and 'false' and
'off' and 'no' (etc) as synonyms for '0' or logical FALSE in the
options in the dirvish config file.  While that might break config
files where 'false' was used by accident when the user was confused
about the effect of logical TRUE, this is far less common than people
setting an option to false then getting confused when it doesn't work
as expected.

Are there any other consequences of this kind of change?  There are
other places that Dirvish is Perlish Churlish that I want to fix
(loosening up the syntax on some array options, for example), but
this is the easiest fix to do.


Keith Lofstrom          keithl at keithl.com         Voice (503)-520-1993
KLIC --- Keith Lofstrom Integrated Circuits --- "Your Ideas in Silicon"
Design Contracting in Bipolar and CMOS - Analog, Digital, and Scan ICs

More information about the Pdx-pm-list mailing list