How do i figure out which dependences of a CPAN distribution require a compiler?
I need to install a perl tool on a production server which has no compiler. I can install CPAN distributions fine via local::lib, but the lack of compiler means I have to ask the sysadmins to install further modules. Due to them having an average turnaround time of 1-2 weeks even for the most ridiculously simple tasks, the process of trying to install, asking 开发者_如何学运维them to install what's borked, trying to install again, etc. etc. is extremely painful.
So how can i figure out quickly which given dependencies of a dist require a c compiler, so i can just give them a list?
When you search for a module in CPAN at http://search.cpan.org, take a look at the far right side of the browser window. Over there you'll see a link called Dependencies. This is right below the link to download the module.
If you click on that link, it'll take you to http://deps.cpantesters.org which will show you the dependency tree for that module. For example, take a look at this one for File::Spec at http://deps.cpantesters.org/?module=File::Spec&perl=5.12.1&os=any+OS&pureperl=on&devperls=on.
It's not perfect, but it'll give you a good idea what modules you do need.
The best way is to use the cpan
command or the ppm
manager on Windows. These will automatically download the dependent modules.
Maybe you could just install all you need on a test server and then package the application along with its dependencies using PAR?
As David said, cpantesters tries to figure out if a module is "pure"..
their explanation on how they do this might be helpful ..
Or I guess you could just install the modules on a similar system and copy them over? Or is this against the "rules"? ;)
Figured out a solution:
Trace system calls with Technet ProcMon (for Windows) or strace on Linux, then run the test suite and filter the result for "/auto/". That way you'll see all dlls it tries to load and can work out the dists requiring a compiler from there.
精彩评论