Skip to content

Commit 8ef5f06

Browse files
haargilmari
authored andcommitted
prevent mro.pm from loading DynaLoader
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.
1 parent 899fb88 commit 8ef5f06

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ext/mro/mro.pm

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@ use warnings;
1212

1313
# mro.pm versions < 1.00 reserved for MRO::Compat
1414
# for partial back-compat to 5.[68].x
15-
our $VERSION = '1.20';
15+
our $VERSION = '1.21';
16+
17+
require XSLoader;
18+
XSLoader::load('mro');
1619

1720
sub import {
1821
mro::set_mro(scalar(caller), $_[1]) if $_[1];
@@ -37,9 +40,6 @@ sub method {
3740
return;
3841
}
3942

40-
require XSLoader;
41-
XSLoader::load('mro');
42-
4343
1;
4444

4545
__END__

0 commit comments

Comments
 (0)