convert to Dist::Zilla
[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;
25
26 with Storage('format' => 'JSON', 'io' => 'File');
27
28 has 'x' => (is => 'rw', isa => 'Int');
29 has 'y' => (is => 'rw', isa => 'Int');
30
31 has 'foo' => (
32 traits => [ 'DoNotSerialize' ],
33 is => 'rw',
34 isa => 'CodeRef',
35 );
36
37 1;
38
39=head1 DESCRIPTION
40
41Sometimes you don't want a particular attribute to be part of the
42serialization, in this case, you want to make sure that attribute
43uses this custom meta-attribute-trait. See the SYNOPSIS for a nice
44example that can be easily cargo-culted.
45
46=head1 METHODS
47
48=head2 Introspection
49
50=over 4
51
52=item B<meta>
53
54=back
55
56=head1 BUGS
57
58All complex software has bugs lurking in it, and this module is no
59exception. If you find a bug please either email me, or add the bug
60to cpan-RT.
61
62=head1 AUTHOR
63
64Stevan Little E<lt>stevan.little@iinteractive.comE<gt>
65
66=head1 COPYRIGHT AND LICENSE
67
68Copyright 2007-2008 by Infinity Interactive, Inc.
69
70L<http://www.iinteractive.com>
71
72This library is free software; you can redistribute it and/or modify
73it under the same terms as Perl itself.
74
75=cut