/usr/share/perl5/perl5i/1/HASH.pm is in libperl5i-perl 2.12.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | # vi: set ts=4 sw=4 ht=4 et :
package perl5i::1::HASH;
use 5.010;
use strict;
use warnings;
require Carp;
sub flip {
Carp::croak("Can't flip hash with references as values")
if grep { ref } values %{$_[0]};
my %flipped = reverse %{$_[0]};
return wantarray ? %flipped : \%flipped;
}
sub merge {
require Hash::Merge::Simple;
my $merged = Hash::Merge::Simple::merge(@_);
return wantarray ? %$merged : $merged;
}
sub print {
my $hash = shift;
print join(" ", map { "$_ => $hash->{$_}" } keys %$hash);
}
sub say {
my $hash = shift;
print join(" ", map { "$_ => $hash->{$_}" } keys %$hash), "\n";
}
1;
|