line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package MooseX::Storage::Meta::Attribute::DoNotSerialize; |
2
|
|
|
|
|
|
|
# ABSTRACT: A custom meta-attribute to bypass serialization |
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
our $VERSION = '0.53'; |
5
|
|
|
|
|
|
|
|
6
|
30
|
|
|
30
|
|
1600
|
use Moose; |
|
30
|
|
|
|
|
63
|
|
|
30
|
|
|
|
|
159
|
|
7
|
30
|
|
|
30
|
|
187359
|
use namespace::autoclean; |
|
30
|
|
|
|
|
193940
|
|
|
30
|
|
|
|
|
139
|
|
8
|
|
|
|
|
|
|
extends 'Moose::Meta::Attribute'; |
9
|
|
|
|
|
|
|
with 'MooseX::Storage::Meta::Attribute::Trait::DoNotSerialize'; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
# register this alias ... |
12
|
|
|
|
|
|
|
package # hide from PAUSE |
13
|
|
|
|
|
|
|
Moose::Meta::Attribute::Custom::DoNotSerialize; |
14
|
|
|
|
|
|
|
|
15
|
2
|
|
|
2
|
|
703
|
sub register_implementation { 'MooseX::Storage::Meta::Attribute::DoNotSerialize' } |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
1; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
__END__ |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=pod |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=encoding UTF-8 |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=head1 NAME |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
MooseX::Storage::Meta::Attribute::DoNotSerialize - A custom meta-attribute to bypass serialization |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head1 VERSION |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
version 0.53 |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=head1 SYNOPSIS |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
package Point; |
36
|
|
|
|
|
|
|
use Moose; |
37
|
|
|
|
|
|
|
use MooseX::Storage; |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
with Storage('format' => 'JSON', 'io' => 'File'); |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
has 'x' => (is => 'rw', isa => 'Int'); |
42
|
|
|
|
|
|
|
has 'y' => (is => 'rw', isa => 'Int'); |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
has 'foo' => ( |
45
|
|
|
|
|
|
|
metaclass => 'DoNotSerialize', |
46
|
|
|
|
|
|
|
is => 'rw', |
47
|
|
|
|
|
|
|
isa => 'CodeRef', |
48
|
|
|
|
|
|
|
); |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
1; |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=head1 DESCRIPTION |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=for stopwords culted |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
Sometimes you don't want a particular attribute to be part of the |
57
|
|
|
|
|
|
|
serialization, in this case, you want to make sure that attribute |
58
|
|
|
|
|
|
|
uses this custom meta-attribute. See the SYNOPSIS for a nice example |
59
|
|
|
|
|
|
|
that can be easily cargo-culted. |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=head1 SUPPORT |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
Bugs may be submitted through L<the RT bug tracker|https://rt.cpan.org/Public/Dist/Display.html?Name=MooseX-Storage> |
64
|
|
|
|
|
|
|
(or L<bug-MooseX-Storage@rt.cpan.org|mailto:bug-MooseX-Storage@rt.cpan.org>). |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
There is also a mailing list available for users of this distribution, at |
67
|
|
|
|
|
|
|
L<http://lists.perl.org/list/moose.html>. |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
There is also an irc channel available for users of this distribution, at |
70
|
|
|
|
|
|
|
L<C<#moose> on C<irc.perl.org>|irc://irc.perl.org/#moose>. |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=head1 AUTHORS |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=over 4 |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=item * |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
Chris Prather <chris.prather@iinteractive.com> |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=item * |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
Stevan Little <stevan.little@iinteractive.com> |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=item * |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
×××× ×§××'×× (Yuval Kogman) <nothingmuch@woobling.org> |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=back |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
This software is copyright (c) 2007 by Infinity Interactive, Inc. |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
95
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
=cut |