File Coverage

blib/lib/MooseX/FunkyAttributes/Meta/Accessor.pm
Criterion Covered Total %
statement 17 17 100.0
branch n/a
condition n/a
subroutine 6 6 100.0
pod n/a
total 23 23 100.0


line stmt bran cond sub pod time code
1             package MooseX::FunkyAttributes::Meta::Accessor;
2              
3 6     6   5133 use 5.008;
  6         23  
  6         237  
4 6     6   34 use strict;
  6         12  
  6         204  
5 6     6   30 use warnings;
  6         10  
  6         337  
6              
7             BEGIN {
8 6     6   13 $MooseX::FunkyAttributes::Meta::Accessor::AUTHORITY = 'cpan:TOBYINK';
9 6         110 $MooseX::FunkyAttributes::Meta::Accessor::VERSION = '0.003';
10             }
11              
12 6     6   33 use Moose;
  6         14  
  6         42  
13 6     6   51316 use namespace::autoclean;
  6         9958  
  6         43  
14              
15             extends qw(Moose::Meta::Method::Accessor);
16              
17             around _instance_is_inlinable => sub
18             {
19             my $orig = shift;
20             my $self = shift;
21             my $attr = $self->associated_attribute;
22             return $attr->accessor_should_be_inlined
23             if $attr->does('MooseX::FunkyAttributes::Role::Attribute');
24             $self->$orig(@_);
25             };
26              
27             1;
28              
29             __END__
30              
31             =head1 NAME
32              
33             MooseX::FunkyAttributes::Meta::Accessor - shim for inlining
34              
35             =head1 DESCRIPTION
36              
37             This is a small subclass of L<Moose::Meta::Method::Accessor> which defers
38             to the attribute the decision on whether the accessor should be inlined.
39              
40             This is quite uninteresting.
41              
42             =head1 BUGS
43              
44             Please report any bugs to
45             L<http://rt.cpan.org/Dist/Display.html?Queue=MooseX-FunkyAttributes>.
46              
47             =head1 SEE ALSO
48              
49             L<MooseX::FunkyAttributes>, L<Moose::Meta::Method::Accessor>.
50              
51             =head1 AUTHOR
52              
53             Toby Inkster E<lt>tobyink@cpan.orgE<gt>.
54              
55             =head1 COPYRIGHT AND LICENCE
56              
57             This software is copyright (c) 2012-2014 by Toby Inkster.
58              
59             This is free software; you can redistribute it and/or modify it under
60             the same terms as the Perl 5 programming language system itself.
61              
62             =head1 DISCLAIMER OF WARRANTIES
63              
64             THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
65             WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
66             MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
67