Hi,

$load_fun is in Wx.pm and should contain a reference to Wx::_load_dll

Clearly I misunderstood scoping.

Perhaps the following will work by just calling Wx::_load_dll directly.

use Wx;
if(($Wx::VERSION =~ /^(0\.95|0\.96)$/) && (not exists($ENV{PAR_0}))) {
  no warnings;
  *Wx::load_dll = sub {
    use warnings;
    return if $^O =~ /^darwin/i;
    Wx::_load_dll( @_ );
  };
}


The problem is that the method Wx::load_dll() does nothing if the OS is linux. This 'breaks' Wx::Html (amongst other things).


I think the code above should work.


On 04/05/2010 14:48, Johan Vromans wrote:
Mark Dootson<mark.doot...@znix.com>  writes:

use Wx;
if(($Wx::VERSION =~ /^(0\.95|0\.96)$/)&&  (not exists($ENV{PAR_0}))) {
    *Wx::load_dll = sub {
      return if $^O =~ /^darwin/i;
      goto&$Wx::load_fun;
    };
}

Thanks for the speedy answer. Unfortunately, it generates some errors:

   Name "Wx::load_fun" used only once: possible typo at /usr/bin/ebwxshell line 
25.
   Subroutine Wx::load_dll redefined at /usr/bin/ebwxshell line 26.
   Use of uninitialized value $Wx::load_fun in subroutine dereference at 
/usr/bin/ebwxshell line 25.
   Unable to create sub named "" at /usr/bin/ebwxshell line 25.
   Compilation failed in require at (eval 75) line 1.

Apparently, Wx::load_fun is unknown or uninitialized. Where is it
supposed to come from?

-- Johan

Reply via email to