aboutsummaryrefslogtreecommitdiff
path: root/lib/Hash/Merge.pm6
diff options
context:
space:
mode:
authorPatrick Spek <Tyil@users.noreply.github.com>2018-03-14 11:20:40 +0100
committerGitHub <noreply@github.com>2018-03-14 11:20:40 +0100
commitb0c043ee6433903a32da78f268ede0a502ac60d8 (patch)
tree69ddfff27974f5d28198323d8ba65cd74191d20d /lib/Hash/Merge.pm6
parent750b429a3051115aa65a272511dbcf2dc4ba6ddb (diff)
parent1158310eee05e2771b982d7735b048ab688165dc (diff)
Merge pull request #4 from scriptkitties/hotfix/no-precompilation
Add no precompilation pragma
Diffstat (limited to 'lib/Hash/Merge.pm6')
-rw-r--r--lib/Hash/Merge.pm68
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/Hash/Merge.pm6 b/lib/Hash/Merge.pm6
index c0358c8..b256b8e 100644
--- a/lib/Hash/Merge.pm6
+++ b/lib/Hash/Merge.pm6
@@ -3,6 +3,10 @@
use v6.c;
use MONKEY-TYPING;
+# Don't use precompilation in order to not conflict with other MONKEY-TYPING
+# modules.
+no precompilation;
+
augment class Hash
{
#| Merges a second hash into the hash the method is called on. Hash given as
@@ -14,11 +18,11 @@ augment class Hash
#| becomes an Array type.
#| Use :no-append-array to replace arrays and positionals instead, which will
#| also retain the original type and not convert to an Array
- #|
multi method merge (Hash:U: %b, Bool:D :$no-append-array = False) {
warn "Cannot merge an undefined Hash!";
return %b;
}
+
multi method merge (Hash:D: %b, Bool:D :$no-append-array = False)
{
hashmerge self, %b, :$no-append-array;
@@ -55,3 +59,5 @@ augment class Hash
%merge-into;
}
}
+
+# vim: ft=perl6 ts=4 sw=4 et