make EOL tests pass
[gitmo/MooseX-Storage.git] / lib / MooseX / Storage / Meta / Attribute / DoNotSerialize.pm
1 package MooseX::Storage::Meta::Attribute::DoNotSerialize;
2 use Moose;
3
4 extends 'Moose::Meta::Attribute';
5    with 'MooseX::Storage::Meta::Attribute::Trait::DoNotSerialize';
6
7 # register this alias ...
8 package Moose::Meta::Attribute::Custom::DoNotSerialize;
9
10 sub register_implementation { 'MooseX::Storage::Meta::Attribute::DoNotSerialize' }
11
12 1;
13
14 __END__
15
16 =pod
17
18 =head1 NAME
19
20 MooseX::Storage::Meta::Attribute::DoNotSerialize - A custom meta-attribute to bypass serialization
21
22 =head1 SYNOPSIS
23
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
41 =head1 DESCRIPTION
42
43
44 Sometimes you don't want a particular attribute to be part of the
45 serialization, in this case, you want to make sure that attribute
46 uses this custom meta-attribute. See the SYNOPSIS for a nice example
47 that can be easily cargo-culted.
48
49 =head1 METHODS
50
51 =head2 Introspection
52
53 =over 4
54
55 =item B<meta>
56
57 =back
58
59 =head1 BUGS
60
61 All complex software has bugs lurking in it, and this module is no
62 exception. If you find a bug please either email me, or add the bug
63 to cpan-RT.
64
65 =head1 AUTHOR
66
67 Chris Prather E<lt>chris.prather@iinteractive.comE<gt>
68
69 Stevan Little E<lt>stevan.little@iinteractive.comE<gt>
70
71 =head1 COPYRIGHT AND LICENSE
72
73 Copyright 2007-2008 by Infinity Interactive, Inc.
74
75 L<http://www.iinteractive.com>
76
77 This library is free software; you can redistribute it and/or modify
78 it under the same terms as Perl itself.
79
80 =cut