1 |
>>>>> On Mon, 28 Mar 2011, Aaron W Swenson wrote: |
2 |
|
3 |
> This module is to replace the existing one that is shipped with |
4 |
> <app-admin/eselect-postgresql-1.0.3. It is an entire rewrite. |
5 |
|
6 |
Some remarks: |
7 |
|
8 |
- Global scope code is a no-no in eselect modules, especially if it |
9 |
calls external programs or accesses external files. Your module |
10 |
will be sourced for commands like "eselect modules list" and there |
11 |
shouldn't be any global scope code being run on such occasions. |
12 |
|
13 |
- Don't use eval. It's almost always an indication that you're doing |
14 |
something wrong. |
15 |
|
16 |
- For tests, please use [[ ]] rather than [ ] throughout. |
17 |
|
18 |
- "output" and "path-manipulation" libraries are always loaded, so you |
19 |
need not (and in fact, you shouldn't) inherit them. |
20 |
|
21 |
- Don't hardcode terminal specific escape sequences (like "\033[1m"). |
22 |
Use the highlighting functions of the output library instead (which |
23 |
in turn use tput). |
24 |
|
25 |
- Suppressing stdout of commands like "do_action env update" is fine, |
26 |
but why suppress stderr? |
27 |
|
28 |
- Please avoid lines wider than 79 positions. |
29 |
|
30 |
See also eselect's README and the developer guide: |
31 |
<http://sources.gentoo.org/cgi-bin/viewvc.cgi/eselect/trunk/README> |
32 |
<http://www.gentoo.org/proj/en/eselect/dev-guide.xml> |
33 |
|
34 |
Ulrich |