line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package List::Objects::WithUtils::Hash; |
2
|
|
|
|
|
|
|
$List::Objects::WithUtils::Hash::VERSION = '2.027002'; |
3
|
133
|
|
|
133
|
|
64594
|
use strictures 2; |
|
133
|
|
|
|
|
840
|
|
|
133
|
|
|
|
|
6059
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
require Role::Tiny; |
6
|
|
|
|
|
|
|
Role::Tiny->apply_roles_to_package( __PACKAGE__, |
7
|
|
|
|
|
|
|
'List::Objects::WithUtils::Role::Hash' |
8
|
|
|
|
|
|
|
); |
9
|
|
|
|
|
|
|
|
10
|
133
|
|
|
133
|
|
30795
|
use Exporter (); |
|
133
|
|
|
|
|
240
|
|
|
133
|
|
|
|
|
7115
|
|
11
|
|
|
|
|
|
|
our @EXPORT = 'hash'; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub import { |
14
|
128
|
|
|
128
|
|
352
|
my $pkg = caller; |
15
|
133
|
|
|
133
|
|
660
|
{ no strict 'refs'; |
|
133
|
|
|
|
|
210
|
|
|
133
|
|
|
|
|
22287
|
|
|
128
|
|
|
|
|
266
|
|
16
|
128
|
|
|
|
|
251
|
${"${pkg}::a"} = ${"${pkg}::a"}; ${"${pkg}::b"} = ${"${pkg}::b"}; |
|
128
|
|
|
|
|
374
|
|
|
128
|
|
|
|
|
511
|
|
|
128
|
|
|
|
|
312
|
|
|
128
|
|
|
|
|
364
|
|
|
128
|
|
|
|
|
396
|
|
17
|
|
|
|
|
|
|
} |
18
|
128
|
|
|
|
|
8447
|
goto &Exporter::import |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
41
|
|
|
41
|
1
|
4660
|
sub hash { __PACKAGE__->new(@_) } |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
print |
24
|
|
|
|
|
|
|
qq[ die "bad meth"\n die "better call saul"\n] |
25
|
|
|
|
|
|
|
unless caller; 1; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=pod |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head1 NAME |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
List::Objects::WithUtils::Hash - Hash-type objects WithUtils |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=head1 SYNOPSIS |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
use List::Objects::WithUtils 'hash'; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
my $hash = hash( foo => 'bar' ); |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head1 DESCRIPTION |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
This class is the basic concrete implementation of |
42
|
|
|
|
|
|
|
L. Methods are documented there. |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head2 hash |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
Creates a new hash object. |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=head1 AUTHOR |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
Jon Portnoy |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
Derived from L by Matt Phillips (CPAN: MATTP) et al |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
Licensed under the same terms as Perl |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=cut |