Mark Dootson wrote:

  Hi,

I had been using the following to load my XS module for Wx::ActiveX

Wx::wx_boot( 'Wx::ActiveX', $VERSION );

This works fine except when running 'make test' on a new build where there is a prior version of Wx::ActiveX installed. In that case, Wx::wx_boot loads the installed DLL and the tests fail with version conflicts.

  What I would expect is that wx_boot would pick up an installed version
of wxWidgets, but only if you have an uninstalled Alien::wxWidgets and
an installed one with the same wxWidgets version.

  I would not expect wx_boot to pick up an already installed
Wx::ActiveX.

I have fixed this by changing to XSLoader which is fine for Wx::ActiveX.

So

XSLoader::load 'Wx::ActiveX', $VERSION;

makes everything happy.

I note that every Wx XS module on cpan uses Wx::wx_boot - but I can't quite figure out why this would be necessary for anything not in the main Wx distribution. (other that the dynaloader switch Perl < 5006)

  It will only be necessary if the CPAN module depends on some wxWidgets
DLL (let's say the html one) and it does not depend on the corresponding
wxPerl module (Wx::Html in this example).

  In all other cases wx_boot will not be necessary.

HTH
Mattia

Reply via email to