1 |
Speaking of perlstyle, perltidy now gives quite an ugly output, especially |
2 |
on the massive ternary operators list. |
3 |
Should we/I continue to use it ? :p |
4 |
If no, is there style rules to follow ? |
5 |
|
6 |
|
7 |
|
8 |
|
9 |
Michael Cummings |
10 |
<mcummings@gento |
11 |
o.org> Pour |
12 |
gentoo-perl@l.g.o |
13 |
12/05/2005 14:11 cc |
14 |
|
15 |
Objet |
16 |
Veuillez Re: [gentoo-perl] g-cpan.pl |
17 |
répondre à |
18 |
gentoo-perl@gent |
19 |
oo.org |
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
On Wednesday 11 May 2005 09:56 pm, David (Sniper) Rigaudiere wrote: |
28 |
> - get rid of \t, and use of 4 spaces as perlstyle :) |
29 |
heh |
30 |
> - get rid of system(mv ...) use File::Copy::move() |
31 |
agreed |
32 |
> |
33 |
> # FIXME Sniper |
34 |
> # the defined() seems mistakes, we want the defined status or ENV values |
35 |
|
36 |
Ah, but when you run this code and the env var isn't defined - you get a |
37 |
broken script that dies on an undeclared var (a la strict and warnings). I |
38 |
added the defines to keep it from choking for those of us that don't have |
39 |
ENV{TMPDIR,ftp_proxy,http_proxy} set. These are the vars portage and cpan |
40 |
use |
41 |
if defined - but if not defined, they don't care - but when trying to set |
42 |
values (and under use strict) we need someway of dealing with them not even |
43 |
|
44 |
existing (vs undef). One of those undef != non-exist - because undef is a |
45 |
value in itself, and in this case the values simply don't exist to test. |
46 |
|
47 |
> ??? my $tmp_dir = -d $ENV{TMPDIR} ? defined($ENV{TMPDIR}) |
48 |
: |
49 |
> $ENV{HOME}; |
50 |
> my $ftp_proxy = $ENV{ftp_proxy} ? defined($ENV{ftp_proxy}) : |
51 |
''; |
52 |
> my $http_proxy = $ENV{http_proxy} ? defined($ENV{http_proxy}) : |
53 |
''; |
54 |
> my $user_shell = -x $ENV{SHELL} ? defined($ENV{SHELL}) : |
55 |
> DEF_BASH_PROG; |
56 |
> |
57 |
> |
58 |
> |
59 |
> |
60 |
> David "Sniper" Rigaudiere |
61 |
> GPG KeyID 0xFF1E982D |
62 |
|
63 |
-- |
64 |
|
65 |
-----o()o--------------------------------------------- |
66 |
Michael Cummings | #gentoo-dev, #gentoo-perl |
67 |
Gentoo Perl Dev | on irc.freenode.net |
68 |
-----o()o--------------------------------------------- |
69 |
[rattachement "attl9ue0.dat" supprimé par ANTOINE RAILLON - |
70 |
E233469/users/PSA] |
71 |
|
72 |
|
73 |
-- |
74 |
gentoo-perl@g.o mailing list |