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.53'; |
5
|
|
|
|
|
|
|
|
6
|
30
|
|
|
30
|
|
26865
|
use Moose::Role; |
|
30
|
|
|
|
|
124462
|
|
|
30
|
|
|
|
|
118
|
|
7
|
30
|
|
|
30
|
|
144121
|
use namespace::autoclean; |
|
30
|
|
|
|
|
64
|
|
|
30
|
|
|
|
|
235
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
# register this alias ... |
10
|
|
|
|
|
|
|
package # hide from PAUSE |
11
|
|
|
|
|
|
|
Moose::Meta::Attribute::Custom::Trait::DoNotSerialize; |
12
|
|
|
|
|
|
|
|
13
|
1
|
|
|
1
|
|
318
|
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.53 |
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 SUPPORT |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
Bugs may be submitted through L<the RT bug tracker|https://rt.cpan.org/Public/Dist/Display.html?Name=MooseX-Storage> |
62
|
|
|
|
|
|
|
(or L<bug-MooseX-Storage@rt.cpan.org|mailto:bug-MooseX-Storage@rt.cpan.org>). |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
There is also a mailing list available for users of this distribution, at |
65
|
|
|
|
|
|
|
L<http://lists.perl.org/list/moose.html>. |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
There is also an irc channel available for users of this distribution, at |
68
|
|
|
|
|
|
|
L<C<#moose> on C<irc.perl.org>|irc://irc.perl.org/#moose>. |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=head1 AUTHORS |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=over 4 |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=item * |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
Chris Prather <chris.prather@iinteractive.com> |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=item * |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
Stevan Little <stevan.little@iinteractive.com> |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=item * |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
×××× ×§××'×× (Yuval Kogman) <nothingmuch@woobling.org> |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=back |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
This software is copyright (c) 2007 by Infinity Interactive, Inc. |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
93
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=cut |