File Coverage

blib/lib/MooseX/Storage/Meta/Attribute/DoNotSerialize.pm
Criterion Covered Total %
statement 7 7 100.0
branch n/a
condition n/a
subroutine 3 3 100.0
pod n/a
total 10 10 100.0


line stmt bran cond sub pod time code
1             package MooseX::Storage::Meta::Attribute::DoNotSerialize;
2             # ABSTRACT: A custom meta-attribute to bypass serialization
3              
4             our $VERSION = '0.50';
5              
6 32     32   2227 use Moose;
  32         64  
  32         207  
7 32     32   200508 use namespace::autoclean;
  32         224387  
  32         165  
8             extends 'Moose::Meta::Attribute';
9             with 'MooseX::Storage::Meta::Attribute::Trait::DoNotSerialize';
10              
11             # register this alias ...
12             package # hide from PAUSE
13             Moose::Meta::Attribute::Custom::DoNotSerialize;
14              
15 2     2   1193 sub register_implementation { 'MooseX::Storage::Meta::Attribute::DoNotSerialize' }
16              
17             1;
18              
19             __END__
20              
21             =pod
22              
23             =encoding UTF-8
24              
25             =head1 NAME
26              
27             MooseX::Storage::Meta::Attribute::DoNotSerialize - A custom meta-attribute to bypass serialization
28              
29             =head1 VERSION
30              
31             version 0.50
32              
33             =head1 SYNOPSIS
34              
35             package Point;
36             use Moose;
37             use MooseX::Storage;
38              
39             with Storage('format' => 'JSON', 'io' => 'File');
40              
41             has 'x' => (is => 'rw', isa => 'Int');
42             has 'y' => (is => 'rw', isa => 'Int');
43              
44             has 'foo' => (
45             metaclass => 'DoNotSerialize',
46             is => 'rw',
47             isa => 'CodeRef',
48             );
49              
50             1;
51              
52             =head1 DESCRIPTION
53              
54             =for stopwords culted
55              
56             Sometimes you don't want a particular attribute to be part of the
57             serialization, in this case, you want to make sure that attribute
58             uses this custom meta-attribute. See the SYNOPSIS for a nice example
59             that can be easily cargo-culted.
60              
61             =head1 METHODS
62              
63             =head2 Introspection
64              
65             =over 4
66              
67             =item B<meta>
68              
69             =back
70              
71             =head1 BUGS
72              
73             All complex software has bugs lurking in it, and this module is no
74             exception. If you find a bug please either email me, or add the bug
75             to cpan-RT.
76              
77             =head1 AUTHORS
78              
79             =over 4
80              
81             =item *
82              
83             Chris Prather <chris.prather@iinteractive.com>
84              
85             =item *
86              
87             Stevan Little <stevan.little@iinteractive.com>
88              
89             =item *
90              
91             יובל קוג'מן (Yuval Kogman) <nothingmuch@woobling.org>
92              
93             =back
94              
95             =head1 COPYRIGHT AND LICENSE
96              
97             This software is copyright (c) 2007 by Infinity Interactive, Inc..
98              
99             This is free software; you can redistribute it and/or modify it under
100             the same terms as the Perl 5 programming language system itself.
101              
102             =cut