Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-perl
Navigation:
Lists: gentoo-perl: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-perl@g.o
From: Michael Cummings <mcummings@g.o>
Subject: Re: g-cpan.pl
Date: Thu, 12 May 2005 08:11:48 -0400
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:
pgpVENpFYmxY0.pgp (PGP signature)
Replies:
Réf. : Re: g-cpan.pl
-- antoine . raillon
References:
g-cpan.pl
-- David (Sniper) Rigaudiere
Navigation:
Lists: gentoo-perl: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
g-cpan.pl
Next by thread:
Réf. : Re: g-cpan.pl
Previous by date:
Re: Réf. : sub ebuild_exists - a lot of lc($dir)
Next by date:
perl gentoolkit ?


Updated Jun 17, 2009

Summary: Archive of the gentoo-perl mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.