* [gentoo-perl] g-cpan.pl
@ 2005-05-12 1:56 David (Sniper) Rigaudiere
2005-05-12 12:11 ` Michael Cummings
0 siblings, 1 reply; 3+ messages in thread
From: David (Sniper) Rigaudiere @ 2005-05-12 1:56 UTC (permalink / raw
To: gentoo-perl
- get rid of \t, and use of 4 spaces as perlstyle :)
- get rid of system(mv ...) use File::Copy::move()
# FIXME Sniper
# the defined() seems mistakes, we want the defined status or ENV values ???
my $tmp_dir = -d $ENV{TMPDIR} ? defined($ENV{TMPDIR}) :
$ENV{HOME};
my $ftp_proxy = $ENV{ftp_proxy} ? defined($ENV{ftp_proxy}) : '';
my $http_proxy = $ENV{http_proxy} ? defined($ENV{http_proxy}) : '';
my $user_shell = -x $ENV{SHELL} ? defined($ENV{SHELL}) :
DEF_BASH_PROG;
David "Sniper" Rigaudiere
GPG KeyID 0xFF1E982D
--
gentoo-perl@gentoo.org mailing list
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [gentoo-perl] g-cpan.pl
2005-05-12 1:56 [gentoo-perl] g-cpan.pl David (Sniper) Rigaudiere
@ 2005-05-12 12:11 ` Michael Cummings
2005-05-12 12:18 ` Réf. : " antoine.raillon
0 siblings, 1 reply; 3+ messages in thread
From: Michael Cummings @ 2005-05-12 12:11 UTC (permalink / raw
To: gentoo-perl
[-- Attachment #1: Type: text/plain, Size: 1534 bytes --]
On Wednesday 11 May 2005 09:56 pm, David (Sniper) Rigaudiere wrote:
> - get rid of \t, and use of 4 spaces as perlstyle :)
heh
> - get rid of system(mv ...) use File::Copy::move()
agreed
>
> # FIXME Sniper
> # the defined() seems mistakes, we want the defined status or ENV values
Ah, but when you run this code and the env var isn't defined - you get a
broken script that dies on an undeclared var (a la strict and warnings). I
added the defines to keep it from choking for those of us that don't have
ENV{TMPDIR,ftp_proxy,http_proxy} set. These are the vars portage and cpan use
if defined - but if not defined, they don't care - but when trying to set
values (and under use strict) we need someway of dealing with them not even
existing (vs undef). One of those undef != non-exist - because undef is a
value in itself, and in this case the values simply don't exist to test.
> ??? my $tmp_dir = -d $ENV{TMPDIR} ? defined($ENV{TMPDIR}) :
> $ENV{HOME};
> my $ftp_proxy = $ENV{ftp_proxy} ? defined($ENV{ftp_proxy}) : '';
> my $http_proxy = $ENV{http_proxy} ? defined($ENV{http_proxy}) : '';
> my $user_shell = -x $ENV{SHELL} ? defined($ENV{SHELL}) :
> DEF_BASH_PROG;
>
>
>
>
> David "Sniper" Rigaudiere
> GPG KeyID 0xFF1E982D
--
-----o()o---------------------------------------------
Michael Cummings | #gentoo-dev, #gentoo-perl
Gentoo Perl Dev | on irc.freenode.net
-----o()o---------------------------------------------
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Réf. : Re: [gentoo-perl] g-cpan.pl
2005-05-12 12:11 ` Michael Cummings
@ 2005-05-12 12:18 ` antoine.raillon
0 siblings, 0 replies; 3+ messages in thread
From: antoine.raillon @ 2005-05-12 12:18 UTC (permalink / raw
To: gentoo-perl
Speaking of perlstyle, perltidy now gives quite an ugly output, especially
on the massive ternary operators list.
Should we/I continue to use it ? :p
If no, is there style rules to follow ?
Michael Cummings
<mcummings@gento
o.org> Pour
gentoo-perl@lists.gentoo.org
12/05/2005 14:11 cc
Objet
Veuillez Re: [gentoo-perl] g-cpan.pl
répondre à
gentoo-perl@gent
oo.org
On Wednesday 11 May 2005 09:56 pm, David (Sniper) Rigaudiere wrote:
> - get rid of \t, and use of 4 spaces as perlstyle :)
heh
> - get rid of system(mv ...) use File::Copy::move()
agreed
>
> # FIXME Sniper
> # the defined() seems mistakes, we want the defined status or ENV values
Ah, but when you run this code and the env var isn't defined - you get a
broken script that dies on an undeclared var (a la strict and warnings). I
added the defines to keep it from choking for those of us that don't have
ENV{TMPDIR,ftp_proxy,http_proxy} set. These are the vars portage and cpan
use
if defined - but if not defined, they don't care - but when trying to set
values (and under use strict) we need someway of dealing with them not even
existing (vs undef). One of those undef != non-exist - because undef is a
value in itself, and in this case the values simply don't exist to test.
> ??? my $tmp_dir = -d $ENV{TMPDIR} ? defined($ENV{TMPDIR})
:
> $ENV{HOME};
> my $ftp_proxy = $ENV{ftp_proxy} ? defined($ENV{ftp_proxy}) :
'';
> my $http_proxy = $ENV{http_proxy} ? defined($ENV{http_proxy}) :
'';
> my $user_shell = -x $ENV{SHELL} ? defined($ENV{SHELL}) :
> DEF_BASH_PROG;
>
>
>
>
> David "Sniper" Rigaudiere
> GPG KeyID 0xFF1E982D
--
-----o()o---------------------------------------------
Michael Cummings | #gentoo-dev, #gentoo-perl
Gentoo Perl Dev | on irc.freenode.net
-----o()o---------------------------------------------
[rattachement "attl9ue0.dat" supprimé par ANTOINE RAILLON -
E233469/users/PSA]
--
gentoo-perl@gentoo.org mailing list
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-05-12 12:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-12 1:56 [gentoo-perl] g-cpan.pl David (Sniper) Rigaudiere
2005-05-12 12:11 ` Michael Cummings
2005-05-12 12:18 ` Réf. : " antoine.raillon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox