File Coverage

blib/lib/Array/Objectify.pm
Criterion Covered Total %
statement 22 22 100.0
branch n/a
condition n/a
subroutine 7 7 100.0
pod 1 1 100.0
total 30 30 100.0


line stmt bran cond sub pod time code
1             package Array::Objectify;
2              
3 3     3   355408 use 5.006;
  3         14  
4 3     3   22 use strict;
  3         22  
  3         147  
5 3     3   17 use warnings;
  3         22  
  3         248  
6             our $VERSION = '0.03';
7 3     3   1439 use Array::Objectify::Tie;
  3         12  
  3         276  
8              
9 3     3   1975 use overload '@{}' => sub { ${$_[0]}->{array}; }, fallback => 1;
  3     19   5758  
  3         38  
  19         6510  
  19         155  
10            
11             sub new {
12 2     2 1 462727 my ($class, @params) = @_;
13            
14 2         10 my $self = \{
15             array => [],
16             };
17            
18 2         7 tie @{${$self}->{array}}, 'Array::Objectify::Tie', @params;
  2         33  
  2         26  
19            
20 2         26 bless $self, $class;
21             }
22              
23             1;
24              
25             __END__