return { %$left, %$right };
}
+sub hslice {
+ my ($hash, $keys) = @_;
+ return { map { $_ => $hash->{$_} } @$keys };
+}
+
# ::Indexed implementation
sub at {
Takes a hashref and returns a new hashref with right precedence
shallow merging.
+=item B<hslice>
+
+Slices a hash but returns the keys and values as a new hashref.
+
=back
=head2 Indexed implementation