Mattia Barbon wrote:
Hi
The patch is OK, one tiny nit: could you move the handling of
$load_fun/$unload_fun to the standard loader? This way a custom loader
will have precedence over the callbacks set via
set_load_function/set_end_function.
OK - I'll rework and test with Wx::Perl::Packager - which uses
set_load_function/set_end_function. Changed as you want, a custom loader
should 'break' it - if it overrides - which I guess is the right thing.
Unfortunately, this won't work, since on Linux (and I suspect other
unices) you can't know the name of the dynamic object, which is the
reason dynamic loading was disabled for Linux. You are correct that
loading the dynamic object as plugins is required for Wx::Html to work
correctly (and probably Wx::XRC, Wx::RichText and Wx::DocView).
One way around it might be to locally replace
DynaLoader::dl_load_file with a version that loads DLLs as if they were
plugins. I will experiment with that.
It works fine on Linux - I use DynaLoader::dl_load_file in the Linux
PPMS and do a ' for (qw( base core adv) ) - dl_load_file '
So it is just a matter of 'munging' the .so extension on the values in
$Wx::dlls
I load the dlls in the call to Wx::_start() - so that they are loaded
before Wx.so and so that Wx::Perl::SplashFast works too.
I was surprised this worked - but it does.
Of course, because it is a PPM, I do know the extensions of the dlls
because I use a specific .so extension rather than the proper symlinks.
For a PPM this seemed OK.
Cheers
Mark