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