Commit | Line | Data |
b430caa3 |
1 | |
2 | package MooseX::Storage::Meta::Attribute::DoNotSerialize; |
3 | use Moose; |
4 | |
69b45b7d |
5 | our $VERSION = '0.01'; |
6 | our $AUTHORITY = 'cpan:STEVAN'; |
7b428d1f |
7 | |
b430caa3 |
8 | extends 'Moose::Meta::Attribute'; |
9 | |
eebcb6dc |
10 | # register this alias ... |
11 | package Moose::Meta::Attribute::Custom::DoNotSerialize; |
7b428d1f |
12 | |
69b45b7d |
13 | our $VERSION = '0.01'; |
14 | our $AUTHORITY = 'cpan:STEVAN'; |
7b428d1f |
15 | |
eebcb6dc |
16 | sub register_implementation { 'MooseX::Storage::Meta::Attribute::DoNotSerialize' } |
17 | |
b430caa3 |
18 | 1; |
19 | |
20 | __END__ |
21 | |
22 | =pod |
23 | |
24 | =head1 NAME |
25 | |
26 | MooseX::Storage::Meta::Attribute::DoNotSerialize |
27 | |
28 | =head1 SYNOPSIS |
29 | |
b477f392 |
30 | package Point; |
31 | use Moose; |
32 | use MooseX::Storage; |
33 | |
34 | with Storage('format' => 'JSON', 'io' => 'File'); |
35 | |
36 | has 'x' => (is => 'rw', isa => 'Int'); |
37 | has 'y' => (is => 'rw', isa => 'Int'); |
38 | |
39 | has 'foo' => ( |
40 | metaclass => 'DoNotSerialize', |
41 | is => 'rw', |
42 | isa => 'CodeRef', |
43 | ); |
44 | |
45 | 1; |
46 | |
b430caa3 |
47 | =head1 DESCRIPTION |
48 | |
b477f392 |
49 | Sometimes you don't want a particular attribute to be part of the |
50 | serialization, in this case, you want to make sure that attribute |
51 | uses this custom meta-attribute. See the SYNOPSIS for a nice example |
52 | that can be easily cargo-culted. |
53 | |
b430caa3 |
54 | =head1 METHODS |
55 | |
56 | =head2 Introspection |
57 | |
58 | =over 4 |
59 | |
60 | =item B<meta> |
61 | |
62 | =back |
63 | |
64 | =head1 BUGS |
65 | |
66 | All complex software has bugs lurking in it, and this module is no |
67 | exception. If you find a bug please either email me, or add the bug |
68 | to cpan-RT. |
69 | |
70 | =head1 AUTHOR |
71 | |
72 | Chris Prather E<lt>chris.prather@iinteractive.comE<gt> |
73 | |
74 | Stevan Little E<lt>stevan.little@iinteractive.comE<gt> |
75 | |
76 | =head1 COPYRIGHT AND LICENSE |
77 | |
78 | Copyright 2007 by Infinity Interactive, Inc. |
79 | |
80 | L<http://www.iinteractive.com> |
81 | |
82 | This library is free software; you can redistribute it and/or modify |
83 | it under the same terms as Perl itself. |
84 | |
85 | =cut |