| 1 | package MoobX::Array; | ||||||||||
| 2 | 6 | our $AUTHORITY = 'cpan:YANICK'; | |||||||||
| 3 | # ABSTRACT: MoobX wrapper for array variables | ||||||||||
| 4 | 6 | $MoobX::Array::VERSION = '0.1.2'; | |||||||||
| 5 | |||||||||||
| 6 | 6 | ▶ | use Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | has value => ( | ||||||||||
| 9 | traits => [ 'Array' ], | ||||||||||
| 10 | is => 'rw', | ||||||||||
| 11 | 0 | ▶ | default => sub { [] }, | ||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||
| 12 | 6 | handles => { | |||||||||
| 13 | FETCHSIZE => 'count', | ||||||||||
| 14 | CLEAR => 'clear', | ||||||||||
| 15 | STORE => 'set', | ||||||||||
| 16 | FETCH => 'get', | ||||||||||
| 17 | PUSH => 'push', | ||||||||||
| 18 | }, | ||||||||||
| 19 | ); | ||||||||||
| 20 | |||||||||||
| 21 | 17 | ▶ | sub EXTEND { } | ||||||||
|
Subroutine
EXTEND: called CC=1 SCAR=0.0
| |||||||||||
| 22 | |||||||||||
| 23 | 0 | ▶ | sub STORESIZE { } | ||||||||
|
Subroutine
STORESIZE: not called CC=1 SCAR=0.0
| |||||||||||
| 24 | |||||||||||
| 25 | 0 | ▶ | sub BUILD_ARGS { | ||||||||
|
Subroutine
BUILD_ARGS: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||
| 26 | 0 | my( $class, @args ) = @_; | |||||||||
| 27 | |||||||||||
| 28 | 0 | ▶ | unshift @args, 'value' if @args == 1; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 29 | |||||||||||
| 30 | 0 | return { @args } | |||||||||
| 31 | } | ||||||||||
| 32 | |||||||||||
| 33 | 17 | ▶ | sub TIEARRAY { | ||||||||
|
Subroutine
TIEARRAY: called CC=1 SCAR=0.0
| |||||||||||
| 34 | 17 | (shift)->new( value => [ @_ ] ) | |||||||||
| 35 | } | ||||||||||
| 36 | |||||||||||
| 37 | |||||||||||
| 38 | 6 | 1; | |||||||||
| 39 | |||||||||||
| 40 | __END__ | ||||||||||