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: antoine.raillon@...
Subject: r14 - code
Date: Thu, 12 May 2005 23:56:30 +0200 (CEST)
Author: mcummings
Date: 2005-05-11 16:44:08 +0200 (Wed, 11 May 2005)
New Revision: 14

Modified:
   code/g-cpan.pl
Log:
Got rid of the regex cost and resorted to basename for prog

Modified: code/g-cpan.pl
===================================================================
--- code/g-cpan.pl	2005-05-11 13:59:01 UTC (rev 13)
+++ code/g-cpan.pl	2005-05-11 14:44:08 UTC (rev 14)
@@ -10,6 +10,7 @@
 use diagnostics;
 use File::Spec;
 use File::Path;
+use File::Basename;
 
 use constant MAKE_CONF         => '/etc/make.conf';
 use constant PATH_PKG_DEV_PERL => '/var/db/pkg/dev-perl';
@@ -41,8 +42,7 @@
 # predeclared subs
 sub printbig;
 
-my $prog = $0;
-$prog =~ s|^.*/||;
+my $prog = basename($0);
 
 # Do we need to generate a config ?
 eval 'use CPAN::Config;';


-- 
gentoo-perl@g.o mailing list

Navigation:
Lists: gentoo-perl: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
r13 - code
Next by thread:
r15 - code
Previous by date:
r13 - code
Next by date:
r15 - code


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.