XSLoader::load cares about the package it is called from. If it is a different package from what you are trying to load, it falls back to loading and using DynaLoader. Move the load call to be in the mro package as it should be, so that it doesn't trigger needless extra load. --- ext/mro/mro.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ext/mro/mro.pm b/ext/mro/mro.pm index 92e8ca38cb..ce928489d5 100644 --- a/ext/mro/mro.pm +++ b/ext/mro/mro.pm @@ -14,6 +14,9 @@ package mro; # for partial back-compat to 5.[68].x our $VERSION = '1.20'; +require XSLoader; +XSLoader::load('mro'); + sub import { mro::set_mro(scalar(caller), $_[1]) if $_[1]; } @@ -37,9 +40,6 @@ sub method { return; } -require XSLoader; -XSLoader::load('mro'); - 1; __END__ -- 2.11.1Thread Next