From: Vincent Pit Date: Thu, 27 Aug 2009 11:50:13 +0000 (+0200) Subject: Load the XS code at BEGIN time X-Git-Tag: v0.08~14 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=944bba0859535ed2059bdba9cb97422c2f3307b6;p=perl%2Fmodules%2Fre-engine-Plugin.git Load the XS code at BEGIN time --- diff --git a/Plugin.pm b/Plugin.pm index b703a00..b67bdc1 100644 --- a/Plugin.pm +++ b/Plugin.pm @@ -2,14 +2,16 @@ package re::engine::Plugin; use 5.009005; use strict; -use XSLoader (); -our $VERSION = '0.07'; +our ($VERSION, @ISA); -# All engines should subclass the core Regexp package -our @ISA = 'Regexp'; - -XSLoader::load __PACKAGE__, $VERSION; +BEGIN { + $VERSION = '0.07'; + # All engines should subclass the core Regexp package + @ISA = 'Regexp'; + require XSLoader; + XSLoader::load(__PACKAGE__, $VERSION); +} my $RE_ENGINE_PLUGIN = ENGINE();