line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package MooseX::Storage::Meta::Attribute::Trait::DoNotSerialize; |
2
|
|
|
|
|
|
|
# ABSTRACT: A custom meta-attribute-trait to bypass serialization |
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
our $VERSION = '0.50'; |
5
|
|
|
|
|
|
|
|
6
|
32
|
|
|
32
|
|
39301
|
use Moose::Role; |
|
32
|
|
|
|
|
119086
|
|
|
32
|
|
|
|
|
158
|
|
7
|
32
|
|
|
32
|
|
161295
|
use namespace::autoclean; |
|
32
|
|
|
|
|
73
|
|
|
32
|
|
|
|
|
283
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
# register this alias ... |
10
|
|
|
|
|
|
|
package # hide from PAUSE |
11
|
|
|
|
|
|
|
Moose::Meta::Attribute::Custom::Trait::DoNotSerialize; |
12
|
|
|
|
|
|
|
|
13
|
1
|
|
|
1
|
|
544
|
sub register_implementation { 'MooseX::Storage::Meta::Attribute::Trait::DoNotSerialize' } |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
1; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
__END__ |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=pod |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=encoding UTF-8 |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=head1 NAME |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
MooseX::Storage::Meta::Attribute::Trait::DoNotSerialize - A custom meta-attribute-trait to bypass serialization |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=head1 VERSION |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
version 0.50 |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=head1 SYNOPSIS |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
package Point; |
34
|
|
|
|
|
|
|
use Moose; |
35
|
|
|
|
|
|
|
use MooseX::Storage; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
with Storage('format' => 'JSON', 'io' => 'File'); |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
has 'x' => (is => 'rw', isa => 'Int'); |
40
|
|
|
|
|
|
|
has 'y' => (is => 'rw', isa => 'Int'); |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
has 'foo' => ( |
43
|
|
|
|
|
|
|
traits => [ 'DoNotSerialize' ], |
44
|
|
|
|
|
|
|
is => 'rw', |
45
|
|
|
|
|
|
|
isa => 'CodeRef', |
46
|
|
|
|
|
|
|
); |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
1; |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head1 DESCRIPTION |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=for stopwords culted |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
Sometimes you don't want a particular attribute to be part of the |
55
|
|
|
|
|
|
|
serialization, in this case, you want to make sure that attribute |
56
|
|
|
|
|
|
|
uses this custom meta-attribute-trait. See the SYNOPSIS for a nice |
57
|
|
|
|
|
|
|
example that can be easily cargo-culted. |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head1 METHODS |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=head2 Introspection |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=over 4 |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=item B<meta> |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=back |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=head1 BUGS |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
All complex software has bugs lurking in it, and this module is no |
72
|
|
|
|
|
|
|
exception. If you find a bug please either email me, or add the bug |
73
|
|
|
|
|
|
|
to cpan-RT. |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=head1 AUTHORS |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=over 4 |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=item * |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
Chris Prather <chris.prather@iinteractive.com> |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
=item * |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
Stevan Little <stevan.little@iinteractive.com> |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=item * |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
×××× ×§××'×× (Yuval Kogman) <nothingmuch@woobling.org> |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=back |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
This software is copyright (c) 2007 by Infinity Interactive, Inc.. |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
98
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=cut |