diff options
author | Jesse Luehrs <doy@tozt.net> | 2011-07-08 03:13:56 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2011-07-08 03:13:56 -0500 |
commit | 8b0a8e232dc4082660ea8daef713e88b9295b2be (patch) | |
tree | 4326e6c6ea2cf306fa317680535e9301837f5aea /lib | |
parent | 1a0c3c3a02da09abc11bbad291d09a41c1850d1d (diff) | |
download | smartmatch-engine-core-8b0a8e232dc4082660ea8daef713e88b9295b2be.tar.gz smartmatch-engine-core-8b0a8e232dc4082660ea8daef713e88b9295b2be.zip |
allow optionally using the pure-perl implementation
Diffstat (limited to 'lib')
-rw-r--r-- | lib/smartmatch/engine/core.pm | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/lib/smartmatch/engine/core.pm b/lib/smartmatch/engine/core.pm index 948152f..60c546b 100644 --- a/lib/smartmatch/engine/core.pm +++ b/lib/smartmatch/engine/core.pm @@ -8,15 +8,17 @@ use parent 'DynaLoader'; sub dl_load_flags { 0x01 } -__PACKAGE__->bootstrap( - # we need to be careful not to touch $VERSION at compile time, otherwise - # DynaLoader will assume it's set and check against it, which will cause - # fail when being run in the checkout without dzil having set the actual - # $VERSION - exists $smartmatch::engine::core::{VERSION} - ? ${ $smartmatch::engine::core::{VERSION} } : (), -); -smartmatch::engine::core::init(__PACKAGE__->can('match')); +if (!$smartmatch::engine::core::USE_PP) { + __PACKAGE__->bootstrap( + # we need to be careful not to touch $VERSION at compile time, + # otherwise DynaLoader will assume it's set and check against it, which + # will cause fail when being run in the checkout without dzil having + # set the actual $VERSION + exists $smartmatch::engine::core::{VERSION} + ? ${ $smartmatch::engine::core::{VERSION} } : (), + ); + smartmatch::engine::core::init(__PACKAGE__->can('match')); +} use B; use Carp qw(croak); |