Mithaldu
Mithaldu

Reputation: 2410

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?

Upvotes: 4

Views: 129

Answers (4)

Øyvind Skaar
Øyvind Skaar

Reputation: 2328

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"? ;)

Upvotes: 3

David W.
David W.

Reputation: 107080

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.

Upvotes: 6

Mithaldu
Mithaldu

Reputation: 2410

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.

Upvotes: -1

jira
jira

Reputation: 3944

Maybe you could just install all you need on a test server and then package the application along with its dependencies using PAR?

Upvotes: 4

Related Questions