groff
[Top][All Lists]
Advanced

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

Re: [PATCH] [bug #65110] [gropdf] should not include full argv[0] in dia


From: G. Branden Robinson
Subject: Re: [PATCH] [bug #65110] [gropdf] should not include full argv[0] in diagnostic messages
Date: Thu, 4 Jan 2024 01:47:41 -0600

At 2024-01-04T01:31:08-0600, Dave Kemper wrote:
> On 1/3/24, G. Branden Robinson <g.branden.robinson@gmail.com> wrote:
> > +{
> > +  my ($v, $d, $f) = File::Spec->splitpath($prog);
> > +  $prog = $f;
> > +}
> 
> Since $v and $d are being discarded anyway, perl doesn't require you
> to create dummy variables for them.
> (http://perldoc.perl.org/perlfunc#my-VARLIST)  You can say:
> 
>    my (undef, undef, $f) = File::Spec->splitpath($prog);
> 
> Although it doesn't matter much in this case, since the scope of these
> variables is so small, the undef version more clearly documents to
> human readers that the first two values returned by splitpath() are
> being discarded.

Ah--thank you!  I'll fix this in my working tree, and the place I stole
it from (grog.pl), any other occurrences grep turns up, and then maybe
my Perl will be a little less strongly accented.  :)

Regards,
Branden

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]