aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamantha McVey <samantham@posteo.net>2017-04-24 23:30:00 -0700
committerSamantha McVey <samantham@posteo.net>2017-04-24 23:30:00 -0700
commit4d1127a556f5d6407cd65c965930511791b919ac (patch)
tree3f7b751993229d1e5d40d62bc1726cdd0eb36c2b
parent7c12bca644bcbdc39c920290f7819f64d1a45ab4 (diff)
POD6 updates
-rw-r--r--lib/mergehash.pm616
1 files changed, 10 insertions, 6 deletions
diff --git a/lib/mergehash.pm6 b/lib/mergehash.pm6
index 1db7e60..db3d016 100644
--- a/lib/mergehash.pm6
+++ b/lib/mergehash.pm6
@@ -1,11 +1,15 @@
use MONKEY;
augment class Hash {
- #|Merges one a second hash into the hash the method is called on
- #|Traverses the full tree, replacing items in the original hash with the
- #|hash given in the argument. Does not replace positional elements by default,
- #|and instead appends the items from the supplied hash's array to the original
- #| hash's array. Use :no-append-array to replace arrays and positionals instead
- #|The object type of positionals is not retained and instead becomes an Array type
+ #| Merges a second hash into the hash the method is called on. Hash given as
+ #| the argument is not modified.
+ #| Traverses the full tree, replacing items in the original hash with the
+ #| hash given in the argument. Does not replace positional elements by default,
+ #| and instead appends the items from the supplied hash's array to the original
+ #| hash's array. The object type of positionals is not retained and instead
+ #| 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
+ #|
method merge (%b; Bool:D :$no-append-array = False) {
hashmerge self, %b, :$no-append-array;
}