In perl.git, the branch smueller/hash_vtable_make_hash has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/ed7c59ab2947ee30e5ae342d194e9135e977927a?hp=d16c49165b773f4a6b3d7a0c4a0c2893a5301a78>

- Log -----------------------------------------------------------------
commit ed7c59ab2947ee30e5ae342d194e9135e977927a
Author: Steffen Mueller <[email protected]>
Date:   Mon Jan 30 20:09:22 2017 +0100

    Hash vtables: Add std mock vtable to registry
-----------------------------------------------------------------------

Summary of changes:
 ext/Hash-Pluggable/Pluggable.xs          | 4 ++++
 ext/Hash-Pluggable/lib/Hash/Pluggable.pm | 5 +++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/ext/Hash-Pluggable/Pluggable.xs b/ext/Hash-Pluggable/Pluggable.xs
index d88a90f1d3..f21fe343db 100644
--- a/ext/Hash-Pluggable/Pluggable.xs
+++ b/ext/Hash-Pluggable/Pluggable.xs
@@ -213,3 +213,7 @@ BOOT:
     XopENTRY_set(&pluggable_anonhash_op, xop_class, OA_LISTOP);
     Perl_custom_op_register(aTHX_ pp_pluggable_anonhash, 
&pluggable_anonhash_op);
 
+    {
+        HV *vr = get_hv("Hash::Pluggable::VtableRegistry", GV_ADD);
+        hv_stores(vr, "Hash::Pluggable/mock", 
newSViv(PTR2IV(&PL_mock_std_vtable)));
+    }
diff --git a/ext/Hash-Pluggable/lib/Hash/Pluggable.pm 
b/ext/Hash-Pluggable/lib/Hash/Pluggable.pm
index 4627fd0322..b9efdf0137 100644
--- a/ext/Hash-Pluggable/lib/Hash/Pluggable.pm
+++ b/ext/Hash-Pluggable/lib/Hash/Pluggable.pm
@@ -3,11 +3,12 @@ use 5.025010;
 use warnings;
 
 our $VERSION = '0.01';
-require XSLoader;
-XSLoader::load();
 
 our %VtableRegistry;
 
+require XSLoader;
+XSLoader::load();
+
 sub import {
     # Enable keywords in lexical scope (the choice of string isn't
     # magical, it just needs to match the one in XS)

--
Perl5 Master Repository

Reply via email to