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 0 1 0.0
total 29 30 96.6


line stmt bran cond sub pod time code
1             package Array::Objectify;
2              
3 2     2   147247 use 5.006;
  2         18  
4 2     2   13 use strict;
  2         3  
  2         71  
5 2     2   14 use warnings;
  2         3  
  2         113  
6             our $VERSION = '0.01';
7 2     2   1210 use Array::Objectify::Tie;
  2         5  
  2         127  
8              
9 2     2   2639 use overload '@{}' => sub { ${$_[0]}->{array}; }, fallback => 1;
  2     11   2111  
  2         34  
  11         4211  
  11         81  
10            
11             sub new {
12 1     1 0 95 my ($class, @params) = @_;
13            
14 1         4 my $self = \{
15             array => [],
16             };
17            
18 1         2 tie @{${$self}->{array}}, 'Array::Objectify::Tie', @params;
  1         2  
  1         9  
19            
20 1         7 bless $self, $class;
21             }
22              
23             1;
24              
25             __END__