File Coverage

blib/lib/KiokuDB/Meta/Attribute/DoNotSerialize.pm
Criterion Covered Total %
statement 10 10 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod 0 1 0.0
total 14 15 93.3


line stmt bran cond sub pod time code
1             #!/usr/bin/perl
2              
3             package KiokuDB::Meta::Attribute::DoNotSerialize;
4 1     1   6 use Moose::Role;
  1         2  
  1         8  
5              
6 1     1   4535 use Moose::Util qw(does_role);
  1         2  
  1         7  
7              
8 1     1   170 use namespace::clean -except => 'meta';
  1         2  
  1         9  
9              
10 1     1 0 27 sub Moose::Meta::Attribute::Custom::Trait::KiokuDB::DoNotSerialize::register_implementation { __PACKAGE__ }
11              
12             __PACKAGE__
13              
14             __END__
15              
16             =pod
17              
18             =head1 NAME
19              
20             KiokuDB::Meta::Attribute::DoNotSerialize - Trait for skipped attributes
21              
22             =head1 SYNOPSIS
23              
24             # in your class:
25              
26             package Foo;
27             use Moose;
28              
29             has bar => (
30             traits => [qw(KiokuDB::DoNotSerialize)],
31             isa => "Bar",
32             is => "ro",
33             lazy_build => 1,
34             );
35              
36             =head1 DESCRIPTION
37              
38             This L<Moose::Meta::Attribute> trait provides tells L<KiokuDB> to skip an
39             attribute when serializing.
40              
41             L<KiokuDB> also recognizes L<MooseX::Meta::Attribute::Trait::DoNotSerialize>,
42             but if you don't want to install L<MooseX::Storage> you can use this instead.
43              
44             =cut
45              
46