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