line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:YANICK'; |
2
|
|
|
|
|
|
|
# ABSTRACT: MoobX wrapper for hash variables |
3
|
|
|
|
|
|
|
$MoobX::Hash::VERSION = '0.1.1'; |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
use Moose; |
6
|
3
|
|
|
3
|
|
1313
|
|
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
17
|
|
7
|
|
|
|
|
|
|
use experimental 'postderef'; |
8
|
3
|
|
|
3
|
|
16697
|
|
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
16
|
|
9
|
|
|
|
|
|
|
has value => ( |
10
|
|
|
|
|
|
|
traits => [ 'Hash' ], |
11
|
|
|
|
|
|
|
is => 'rw', |
12
|
|
|
|
|
|
|
default => sub { +{} }, |
13
|
|
|
|
|
|
|
handles => { |
14
|
|
|
|
|
|
|
FETCH => 'get', |
15
|
|
|
|
|
|
|
STORE => 'set', |
16
|
|
|
|
|
|
|
CLEAR => 'clear', |
17
|
|
|
|
|
|
|
DELETE => 'delete', |
18
|
|
|
|
|
|
|
EXISTS => 'exists', |
19
|
|
|
|
|
|
|
}, |
20
|
|
|
|
|
|
|
); |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
my( $class, @args ) = @_; |
23
|
|
|
|
|
|
|
|
24
|
0
|
|
|
0
|
0
|
0
|
unshift @args, 'value' if @args == 1; |
25
|
|
|
|
|
|
|
|
26
|
0
|
0
|
|
|
|
0
|
return { @args } |
27
|
|
|
|
|
|
|
} |
28
|
0
|
|
|
|
|
0
|
|
29
|
|
|
|
|
|
|
(shift)->new( value => +{ @_ } ) |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
5
|
|
|
5
|
|
53
|
|
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
|
35
|
11
|
|
|
11
|
|
48
|
1; |
|
11
|
|
|
|
|
252
|
|
|
11
|
|
|
|
|
195
|
|
36
|
11
|
|
|
11
|
|
40
|
|
|
11
|
|
|
|
|
204
|
|
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=pod |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=encoding UTF-8 |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=head1 NAME |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
MoobX::Hash - MoobX wrapper for hash variables |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head1 VERSION |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
version 0.1.1 |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head1 DESCRIPTION |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
Class implementing a C<tie>ing interface for hash variables. |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
Used internally by L<MoobX>. |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=head1 AUTHOR |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
Yanick Champoux <yanick@cpan.org> |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
This software is copyright (c) 2022, 2017 by Yanick Champoux. |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
65
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=cut |