line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package MoobX::Attributes; |
2
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:YANICK'; |
3
|
|
|
|
|
|
|
#ABSTRACT: Attributes to annotate variables as MoobX observables |
4
|
|
|
|
|
|
|
$MoobX::Attributes::VERSION = '0.1.0'; |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
|
7
|
8
|
|
|
8
|
|
3379
|
use 5.20.0; |
|
8
|
|
|
|
|
17
|
|
8
|
|
|
|
|
|
|
|
9
|
8
|
|
|
8
|
|
28
|
use MoobX '!:attributes'; |
|
8
|
|
|
|
|
8
|
|
|
8
|
|
|
|
|
57
|
|
10
|
|
|
|
|
|
|
|
11
|
8
|
|
|
8
|
|
4677
|
use Attribute::Handlers; |
|
8
|
|
|
|
|
28066
|
|
|
8
|
|
|
|
|
35
|
|
12
|
|
|
|
|
|
|
|
13
|
8
|
|
|
8
|
|
243
|
no warnings 'redefine'; |
|
8
|
|
|
|
|
11
|
|
|
8
|
|
|
|
|
423
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub Observable :ATTR(SCALAR) { |
16
|
4
|
|
|
4
|
0
|
13573
|
my ($package, $symbol, $referent, $attr, $data) = @_; |
17
|
|
|
|
|
|
|
|
18
|
4
|
|
|
|
|
18
|
MoobX::observable_ref($referent); |
19
|
8
|
|
|
8
|
|
31
|
} |
|
8
|
|
|
|
|
10
|
|
|
8
|
|
|
|
|
25
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub Observable :ATTR(ARRAY) { |
22
|
1
|
|
|
1
|
0
|
2712
|
my ($package, $symbol, $referent, $attr, $data) = @_; |
23
|
|
|
|
|
|
|
|
24
|
1
|
|
|
|
|
5
|
MoobX::observable_ref($referent); |
25
|
8
|
|
|
8
|
|
1544
|
} |
|
8
|
|
|
|
|
10
|
|
|
8
|
|
|
|
|
40
|
|
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub Observable :ATTR(HASH) { |
28
|
1
|
|
|
1
|
0
|
3065
|
my ($package, $symbol, $referent, $attr, $data) = @_; |
29
|
|
|
|
|
|
|
|
30
|
1
|
|
|
|
|
4
|
MoobX::observable_ref($referent); |
31
|
8
|
|
|
8
|
|
1512
|
} |
|
8
|
|
|
|
|
13
|
|
|
8
|
|
|
|
|
24
|
|
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
1; |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
__END__ |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=pod |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=encoding UTF-8 |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head1 NAME |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
MoobX::Attributes - Attributes to annotate variables as MoobX observables |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head1 VERSION |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
version 0.1.0 |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head1 SYNOPSIS |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
use MoobX; |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
my $foo :Observable; |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head1 DESCRIPTION |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
Used internally by L<MoobX>. |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head1 AUTHOR |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
Yanick Champoux <yanick@cpan.org> |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
This software is copyright (c) 2017 by Yanick Champoux. |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
68
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=cut |