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