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