File Coverage

blib/lib/Acme/Akashic/Records.pm
Criterion Covered Total %
statement 12 21 57.1
branch n/a
condition n/a
subroutine 4 9 44.4
pod n/a
total 16 30 53.3


line stmt bran cond sub pod time code
1             package Acme::Akashic::Records;
2 1     1   23456 use warnings;
  1         4  
  1         40  
3 1     1   7 use strict;
  1         2  
  1         135  
4             our $VERSION = sprintf "%d.%02d", q$Revision: 0.1 $ =~ /(\d+)/g;
5              
6             my $records;
7             $records = \$records;
8             bless $records, __PACKAGE__;
9              
10 0     0     sub AUTOLOAD { $records }
11              
12             for my $type (qw/ARRAY HASH HANDLE/) {
13 1     1   6 no strict 'refs';
  1         6  
  1         228  
14             *{ __PACKAGE__ . '::' . $type . '::AUTOLOAD' } = \&AUTOLOAD;
15             }
16              
17             use overload
18 0     0     '@{}' => sub { tie my @records, __PACKAGE__ . '::ARRAY'; \@records },
  0            
19 0     0     '%{}' => sub { tie my %records, __PACKAGE__ . '::HASH'; \%records },
  0            
20 0     0     '*{}' => sub { tie *records, __PACKAGE__ . '::HANDLE'; \*records },
  0            
21 0     0     '&{}' => sub { sub { $records } },
  0            
22 1     1   1968 fallback => 1;
  1         1134  
  1         17  
23              
24             $records; # End of Acme::Akashic::Records -- or do they ever end?
25             __END__