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