Re: tpm2deb-bin.pl: minor Perl issues
Florent Rougon <f.rougon@free.fr> wrote:
> Frank Küster <frank@debian.org> wrote:
>
>> 1. tpm2deb-bin.pl frequently uses constructs like
>>
>> eval { mkpath($rundest) };
>> if ($@) {
>> die "Couldn't create dir: $@";
>> }
>>
>> In terms of readability, I would prefer
>>
>> system("mkdir -p $rundest") == 0
>> or die "Couldn't create dir $rundest";
>
> Not that I understand anything about Perl, but using system() exposes
> you to problems with argument quoting (spaces, dollar signs, etc.). And
> it launches a shell for nothing useful
ACK. But then I'd rather use some alternative to mkpath which can be
used in a
othermkpath($rundes) or die "...";
Regards, Frank
--
Dr. Frank Küster
Single Molecule Spectroscopy, Protein Folding @ Inst. f. Biochemie, Univ. Zürich
Debian Developer (teTeX/TeXLive)
Reply to: