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