Gentoo Archives: gentoo-dev

From: Kent Fredric <kentnl@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [PATCH] perl-functions.eclass: Replace unnecessary eval with ${!var}
Date: Fri, 24 Feb 2017 08:31:47
Message-Id: 20170224213055.4d3cd081@katipo2.lan
In Reply to: [gentoo-dev] [PATCH] perl-functions.eclass: Replace unnecessary eval with ${!var} by "Michał Górny"
1 On Thu, 23 Feb 2017 18:02:10 +0100
2 Michał Górny <mgorny@g.o> wrote:
3
4 > ---
5 > eclass/perl-functions.eclass | 2 +-
6 > 1 file changed, 1 insertion(+), 1 deletion(-)
7 >
8 > diff --git a/eclass/perl-functions.eclass b/eclass/perl-functions.eclass
9 > index 1542b98cd45f..85907354a309 100644
10 > --- a/eclass/perl-functions.eclass
11 > +++ b/eclass/perl-functions.eclass
12 > @@ -276,7 +276,7 @@ perl_check_env() {
13 > errored=1
14 >
15 > # Read ENV Value
16 > - eval "value=\$$i";
17 > + value=${!i};
18 >
19 > # Print ENV name/value pair
20 > if [ -n "${I_KNOW_WHAT_I_AM_DOING}" ]; then
21
22
23
24 There's a bunch of other changes pending to perl-functions.eclass that I'd like
25 to commit all at once as soon as I'm done properly testing the changes, that way
26 we'll reduce the number of "fetch/regenerate 1700 files in metadata/*/dev-perl"
27 cycles (hopefully).
28
29 Otherwise it Looks good.
30
31 Aforementioned change set was reviewed privately with soap and then submitted
32 to the -dev ML for feedback but nobody has yet to comment, so they must be perfect :D

Replies