public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] [PATCH] perl-functions.eclass: Replace unnecessary eval with ${!var}
@ 2017-02-23 17:02 Michał Górny
  2017-02-24  8:30 ` Kent Fredric
  0 siblings, 1 reply; 4+ messages in thread
From: Michał Górny @ 2017-02-23 17:02 UTC (permalink / raw
  To: gentoo-dev; +Cc: Michał Górny

---
 eclass/perl-functions.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/perl-functions.eclass b/eclass/perl-functions.eclass
index 1542b98cd45f..85907354a309 100644
--- a/eclass/perl-functions.eclass
+++ b/eclass/perl-functions.eclass
@@ -276,7 +276,7 @@ perl_check_env() {
 		errored=1
 
 		# Read ENV Value
-		eval "value=\$$i";
+		value=${!i};
 
 		# Print ENV name/value pair
 		if [ -n "${I_KNOW_WHAT_I_AM_DOING}" ]; then
-- 
2.11.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [gentoo-dev] [PATCH] perl-functions.eclass: Replace unnecessary eval with ${!var}
  2017-02-23 17:02 [gentoo-dev] [PATCH] perl-functions.eclass: Replace unnecessary eval with ${!var} Michał Górny
@ 2017-02-24  8:30 ` Kent Fredric
  2017-02-24 13:11   ` Michał Górny
  0 siblings, 1 reply; 4+ messages in thread
From: Kent Fredric @ 2017-02-24  8:30 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1065 bytes --]

On Thu, 23 Feb 2017 18:02:10 +0100
Michał Górny <mgorny@gentoo.org> wrote:

> ---
>  eclass/perl-functions.eclass | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/eclass/perl-functions.eclass b/eclass/perl-functions.eclass
> index 1542b98cd45f..85907354a309 100644
> --- a/eclass/perl-functions.eclass
> +++ b/eclass/perl-functions.eclass
> @@ -276,7 +276,7 @@ perl_check_env() {
>  		errored=1
>  
>  		# Read ENV Value
> -		eval "value=\$$i";
> +		value=${!i};
>  
>  		# Print ENV name/value pair
>  		if [ -n "${I_KNOW_WHAT_I_AM_DOING}" ]; then



There's a bunch of other changes pending to perl-functions.eclass that I'd like
to commit all at once as soon as I'm done properly testing the changes, that way
we'll reduce the number of "fetch/regenerate 1700 files in metadata/*/dev-perl"
cycles (hopefully).

Otherwise it Looks good. 

Aforementioned change set was reviewed privately with soap and then submitted
to the -dev ML for feedback but nobody has yet to comment, so they must be perfect :D 

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [gentoo-dev] [PATCH] perl-functions.eclass: Replace unnecessary eval with ${!var}
  2017-02-24  8:30 ` Kent Fredric
@ 2017-02-24 13:11   ` Michał Górny
  2017-02-25 17:53     ` Kent Fredric
  0 siblings, 1 reply; 4+ messages in thread
From: Michał Górny @ 2017-02-24 13:11 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 532 bytes --]

W dniu 24.02.2017, pią o godzinie 21∶30 +1300, użytkownik Kent Fredric
napisał:
> Aforementioned change set was reviewed privately with soap and then submitted
> to the -dev ML for feedback but nobody has yet to comment, so they must be perfect :D 

If there is no hurry to the other changes, maybe either of us could
commit them all at once along with all those eval patches (say, in 6
days)? The eutils change is going to cause almost everything to be
regenerated anyway ;-).

-- 
Best regards,
Michał Górny

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 963 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [gentoo-dev] [PATCH] perl-functions.eclass: Replace unnecessary eval with ${!var}
  2017-02-24 13:11   ` Michał Górny
@ 2017-02-25 17:53     ` Kent Fredric
  0 siblings, 0 replies; 4+ messages in thread
From: Kent Fredric @ 2017-02-25 17:53 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 788 bytes --]

On Fri, 24 Feb 2017 14:11:57 +0100
Michał Górny <mgorny@gentoo.org> wrote:

> If there is no hurry to the other changes, maybe either of us could
> commit them all at once along with all those eval patches (say, in 6
> days)? The eutils change is going to cause almost everything to be
> regenerated anyway ;-).

If its going to sneak in the tail end of the mass eutils change, then I'm not
opposed.

I have to sit down anyway and work out wtf is going on with prefix+perl anyway,
because 2 new functions I was *intending* to help with prefix conditions have been
so far impossible to prove they actually do what they're supposed to do, due to
complete inability to get a working prefix (ie: gentoo-in-$HOME) install.

So my changeset might be greatly delayed by this.

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-02-25 17:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-23 17:02 [gentoo-dev] [PATCH] perl-functions.eclass: Replace unnecessary eval with ${!var} Michał Górny
2017-02-24  8:30 ` Kent Fredric
2017-02-24 13:11   ` Michał Górny
2017-02-25 17:53     ` Kent Fredric

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox