Re: [Perlgssapi-users] krb5-config not found
Brought to you by:
achimgrolms
|
From: David L. <Dav...@qu...> - 2007-05-14 00:56:34
|
Achim Grolms wrote:
> On Saturday 12 May 2007 08:41, simon wrote:
>
>> Hello,
>>
>> nothing is returned from:
>>
>> which krb5-config
>>
>
> OK. Maybe me understanding of how 'which' works or should work
> ist wrong.
> My idea was that 'which krb5-config' locates the absolute path of
> krb5-config if this executeable can be found in $PATH.
>
> Simon, '/usr/bin/' is a member of your PATH environment?
>
> If my understanding of 'which' is wrong - can someone
> more experienced can help me and explain what's wrong
> with my understanding?
>
I'm no expert, but which/whereis have always bitten me in painful ways
when I used them in my .profile/startup scripts. You can't rely on the
platform from giving you something consistent. But, something simple in
Makefile.PL could work and be reliable. Like this:
sub which {
my $prog = shift;
for (split(/:/,$ENV{'PATH'})) {
my $fullpath = "$_/$prog";
return $fullpath if -x $fullpath and -f $fullpath;
}
return undef;
}
(Although this code is broken if $PATH contains a double colon or ends
with a colon.)
> Thank you,
> Achim
>
>
--
David Leonard
Resource Central software engineer
Quest Software; 303 Adelaide St, Brisbane, Australia; www.quest.com
Phone: (US) +1 801 655 2755 (AU) +61 7 3023 5133
|