[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Use of VERBOSE in debian-cd



On 10/26/07, Otavio Salvador <otavio@debian.org> wrote:
> "Bruce Korb" <bruce.korb@gmail.com> writes:
>
> > Hi all,
> >
> > The debian-cd scripts are not necessarily run by hand.
> > A higher level script may be driving. [...].  Please consider being careful:
> >
> > my $verbose = $ENV{VERBOSE} || 0;
> > if ($verbose !~ m/^\d+$/) {
> >     $verbose = 0;
> > }
>
> Personally I don't like this change since all the other vars has same
> usage and then we would need to validate all of them.
>
> All debian-cd uses 0 and 1 for false and true.

But not all scripts that use debian-cd.

> About the proposed change, you forgot to quote VERBOSE a as 'VERBOSE'.

I'm not a perl programmer.  Anyway, it is helpful to validate
environment variable
values you get from other programs/scripts.  Especially something that might be
in very common use like "VERBOSE".  Were it "LIST2CD_VERBOSE", that'd
be a different issue.  And a non-issue were it set with a command line option.
In the end, it's only an ugly error message from perl.  It does not
the program to die.
Thanks - Bruce



Reply to: