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