Skip Menu |
 

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the File-Which CPAN distribution.

Report information
The Basics
Id: 49559
Status: resolved
Priority: 0/
Queue: File-Which

People
Owner: Nobody in particular
Requestors: me [...] v4hn.de
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)

Attachments
File-Which-return-working-argument.diff



Subject: which does support `which /usr/bin/lynx` => /usr/bin/lynx, File::Which doesn't
Date: Wed, 9 Sep 2009 16:45:42 +0200
To: bug-File-Which [...] rt.cpan.org
From: v4hn <me [...] v4hn.de>
Download (untitled)
application/pgp-signature 198b

Message body not shown because it is not plain text.

Download (untitled) / with headers
text/plain 794b
ev'ning, During the last weeks I often wondered why this happens in my cpan: [code] Show quoted text
cpan> perldoc <Module>
Running perldoc for module '<Module>' CPAN: File::Which loaded ok (v1.07) You need to install lynx or html2text.pl to use this feature. Show quoted text
cpan> o conf lynx
lynx [/usr/bin/lynx] Show quoted text
cpan>!print "got lynx" if -x "/usr/bin/lynx"; cpan> got lynx
[/code] While debugging I found out that CPAN::Distribution::_check_binary uses File::Which if available, instead of using the shell command `which`, and that File::Which doesn't support the feature of checking a given absolute path. So my configuration works with your module not installed but doesn't with your module installed: that's why I consider the missing of this feature as a bug. :) A small patch is attached. v4hn

Message body is not shown because sender requested not to inline it.

Download (untitled) / with headers
text/plain 1.2k
This patch isn't quite right because in addition to finding ./bar it also finds bar, as the system which will not, this is a false positive: twin% ls -l bar -rwxr-xr-x 1 ollisg ollisg 0 Mar 26 05:09 bar* twin% which bar bar: Command not found. twin% which ./bar ./bar twin% perl -Ilib script/pwhich bar bar twin% perl -Ilib script/pwhich ./bar ./bar On Wed Sep 09 10:46:23 2009, me@v4hn.de wrote: Show quoted text
> ev'ning, > > During the last weeks I often wondered why this happens in my cpan: > > [code]
> cpan> perldoc <Module>
> Running perldoc for module '<Module>' > CPAN: File::Which loaded ok (v1.07) > > You need to install lynx or html2text.pl to use this feature.
> cpan> o conf lynx
> lynx [/usr/bin/lynx] >
> cpan>!print "got lynx" if -x "/usr/bin/lynx"; > cpan> got lynx
> [/code] > > While debugging I found out that CPAN::Distribution::_check_binary > uses File::Which if available, instead of using the shell command `which`, > and that File::Which doesn't support the feature of checking > a given absolute path. So my configuration works with your module > not installed but doesn't with your module installed: > that's why I consider the missing of this feature as a bug. :) > A small patch is attached. > > > v4hn
Please follow this issue here: https://github.com/plicease/File-Which/issues/2
Download (untitled) / with headers
text/plain 144b
I believe this to be fixed. If you find otherwise, feel free to re-open the GitHub issue (preferred) or comment on this rt ticket with details.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.