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: Dave Kemper
Subject: Re: [PATCH] [bug #65110] [gropdf] should not include full argv[0] in diagnostic messages
Date: Thu, 4 Jan 2024 01:31:08 -0600

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.



reply via email to

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