Perl5-Alien/Alien-Base — pull request #51 by plicease (2014-09-02 15:25:48+00:00)
Title: add property alien_isolate_dynamic

This is my proposed solution for #11. It isolates the dynamic libraries into a separate directory so they will not be considered when creating XS modules. This is only done when alien_isolate_dynamic is set to true. For this to be useful, the author of a `Alien::Foo` module will need to build position independent code on platforms that require it, in which case also accepting #47 or something similar will be highly desirable.

There are a number of advantages to forcing static libraries when building XS modules:

1. upgrades to `Alien::Foo` will no longer break `Foo::XS`. The downside is that `Foo::XS` will still be using the old version of `libfoo`, but I believe this is better than breaking the module.

2. `Alien::Foo` is no longer a run time dep for `Foo::XS` (just a build dep) so there is less to load

3. The method that currently AB uses for including dynamic libraries in platform specific search paths is broken on some platforms, such as Solaris (#50) and Windows (#32). Though this is probably solvable.

There are also risks, but given that this `alien_isolate_dynamic` is optional they seem to be minimal.

That being said I think there is an argument for making `alien_isolate_dynamic` true by default, if not immediately, then some time down the road. I think the number of `Alien::Foo` type dists that would benefit from this feature is probably larger than the number with risks.