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