From: | Davide Pesavento <pesa@g.o> | ||
---|---|---|---|
To: | gentoo-dev@l.g.o | ||
Subject: | Re: [gentoo-dev] [PATCH] eutils.eclass: In EAPI conditionals, replace "has" by case statements. | ||
Date: | Sun, 29 Nov 2015 23:29:36 | ||
Message-Id: | CADfzvvZMth_6Cq6Juzf5eHc10EA0FW_9yUy_Rzsnq0qzvPuEnQ@mail.gmail.com | ||
In Reply to: | [gentoo-dev] [PATCH] eutils.eclass: In EAPI conditionals, replace "has" by case statements. by Ulrich Mueller |
1 | On Sun, Nov 29, 2015 at 5:48 PM, Ulrich Mueller <ulm@g.o> wrote: |
2 | > As suggested by mgorny, we could use bash internals instead of the |
3 | > "has" function calls in global scope. |
4 | > |
5 | > The patch below replaces them by case statements. (Unfortunately we |
6 | > cannot use fall-through (&;) because it is a bash 4 feature.) |
7 | |
8 | Sounds reasonable, although I'd find an 'if' clause slightly more |
9 | readable, since there wouldn't be an 'else' branch in 2 out of 3 |
10 | cases. |
11 | |
12 | Thanks, |
13 | Davide |
Subject | Author |
---|---|
Re: [gentoo-dev] [PATCH] eutils.eclass: In EAPI conditionals, replace "has" by case statements. | Ulrich Mueller <ulm@g.o> |