Tue Nov 01 21:36:00 2011: Request 72082 was acted upon. Transaction: Correspondence added by mdengf...@gmail.com Queue: Module-ScanDeps Subject: Re: [rt.cpan.org #72082] $FindBin::Bin issue on Moudel::ScanDeps 1.04 Broken in: (no value) Severity: (no value) Owner: RSCHUPP Requestors: mdengf...@gmail.com Status: open Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=72082 >
Yes, the patch works for the FindBin case now. scandeps.pl can output the correct modules. Really appreciate your quick response. Thanks Dengfeng 2011/11/2 Roderich Schupp via RT <bug-module-scand...@rt.cpan.org> > <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 > > > > -- --------------------------------------------------------- Market is wrong, But I am right!