Tue Nov 01 18:11:09 2011: Request 72082 was acted upon.
Transaction: Correspondence added by RSCHUPP
Queue: Module-ScanDeps
Subject: $FindBin::Bin issue on Moudel::ScanDeps 1.04
Broken in: (no value)
Severity: (no value)
Owner: RSCHUPP
Requestors: mdengfeng@gmail.com
Status: open
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=72082 >
OK, I see what's happening:
When you call scandeps.pl with option
-c (or -x) it creates a temporary file that contains the text
of the file to scan plus some prologue code. This prologue code
will be called at the end of compilation (-c) or execution (-x)
and just dumps the contents of %INC, $INC etc. scandeps.pl runs
an inferior perl on this temporary file and reads back the information.
This temporary file used to be created in your working directory,
so if your script is also located there, FindBin for your script
and for the temp file would come to the same result.
In 1.04 I changed it so that the temp file is created in your
platform's temp directory. That explains why you see /tmp/lib
in @INC in the error message.
Can you try the attached patch? It makes FindBin return
the correct result by setting $0 to the path of your script.
Cheers, Roderich
Thread Previous
|
Thread Next