File Coverage

blib/lib/Pad/Tie/Plugin/ScalarAttr.pm
Criterion Covered Total %
statement 14 14 100.0
branch n/a
condition n/a
subroutine 7 7 100.0
pod 0 4 0.0
total 21 25 84.0


line stmt bran cond sub pod time code
1 1     1   924 use strict;
  1         4  
  1         37  
2 1     1   6 use warnings;
  1         3  
  1         36  
3              
4             package Pad::Tie::Plugin::ScalarAttr;
5              
6 1     1   5 use base 'Pad::Tie::Plugin::Base::HashObjectAttr';
  1         2  
  1         227  
7              
8 2     2 0 7 sub attr_type { 'scalar' }
9              
10 2     2 0 5 sub sigil { '$' }
11              
12             sub scalar_attr {
13 1     1 0 9 shift->build_attrs(@_);
14             }
15              
16             sub ref_for_attr {
17 9     9 0 26 my ($plugin, $ctx, $self, $arg) = @_;
18 9         93 return \$self->{invocant}->{$arg->{method}};
19             }
20              
21             1;