SOURCES: mysqltuner.patch - todo (quite obvious one)
Przemyslaw Iskra
sparky at pld-linux.org
Tue Dec 2 00:39:47 CET 2008
On Mon, Dec 01, 2008 at 11:46:04PM +0100, glen wrote:
> +TODO: cook perlish which(), or hardcode
should be enough:
sub which($)
{
my $file = shift || return undef;
foreach my $dir ( split /:/, ( $ENV{PATH} || return undef ) ) {
my $path = $dir . '/' . $file;
return $path if -x $path;
}
}
you may change "return undef" to "die" to make it paranoid if needed
--
____ Sparky{PI] -- Przemyslaw _ ___ _ _ ........... LANG...Pl..Ca..Es..En
/____) ___ ___ _ _ || Iskra | | _ \| | | : WWW........ppcrcd.pld-linux.org
\____\| -_)'___| ||^'||//\\// < | _/| | | : JID......sparky<at>jabberes.org
(____/|| (_-_|_|| ||\\ || |_ |_| |_| _| : Mail....sparky<at>pld-linux.org
More information about the pld-devel-en
mailing list