line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package List::Objects::WithUtils::Hash; |
2
|
|
|
|
|
|
|
$List::Objects::WithUtils::Hash::VERSION = '2.028002'; |
3
|
136
|
|
|
136
|
|
39787
|
use strictures 2; |
|
136
|
|
|
|
|
615
|
|
|
136
|
|
|
|
|
4345
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
require Role::Tiny; |
6
|
|
|
|
|
|
|
Role::Tiny->apply_roles_to_package( __PACKAGE__, |
7
|
|
|
|
|
|
|
'List::Objects::WithUtils::Role::Hash' |
8
|
|
|
|
|
|
|
); |
9
|
|
|
|
|
|
|
|
10
|
136
|
|
|
136
|
|
20523
|
use Exporter (); |
|
136
|
|
|
|
|
160
|
|
|
136
|
|
|
|
|
5949
|
|
11
|
|
|
|
|
|
|
our @EXPORT = 'hash'; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub import { |
14
|
131
|
|
|
131
|
|
243
|
my $pkg = caller; |
15
|
136
|
|
|
136
|
|
449
|
{ no strict 'refs'; |
|
136
|
|
|
|
|
135
|
|
|
136
|
|
|
|
|
17101
|
|
|
131
|
|
|
|
|
148
|
|
16
|
131
|
|
|
|
|
163
|
${"${pkg}::a"} = ${"${pkg}::a"}; ${"${pkg}::b"} = ${"${pkg}::b"}; |
|
131
|
|
|
|
|
292
|
|
|
131
|
|
|
|
|
392
|
|
|
131
|
|
|
|
|
129
|
|
|
131
|
|
|
|
|
220
|
|
|
131
|
|
|
|
|
260
|
|
17
|
|
|
|
|
|
|
} |
18
|
131
|
|
|
|
|
7102
|
goto &Exporter::import |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
47
|
|
|
47
|
1
|
4102
|
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 |