Skip to content

Using Hash::Merge breaks use of object hashes in programs using it #1

Closed
@jnthn

Description

@jnthn

The issue:

$ perl6 -e 'use Hash::Merge; my %h{Any}'
===SORRY!===
Cannot invoke this object (REPR: Null; VMNull)

I golfed this down from a crash in an application that is using Config, which in turn depends on Hash::Merge, and was exploding on a use of classify. The classify method uses object hashes, which no longer work after a use of this module, as shown above.

In general, modules that use MONKEY-TYPING should also do no precompilation, since it's not possible to load two precompiled modules that monkey-patch the same type in the same program.

Really, Rakudo should be taking a use MONKEY-TYPING as implying no precompilation. Even then, I think there's still a separate bug. I will file a Rakudo issue about this, and see if something can be fixed at that level (both the implied no precompilation and the issue that leads to the null invocation error seen here).

In the meantime, a release of this module that adds no precompilation would provide relief for those who want to use Config; if it helps, I can provide a PR to add that one line.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions