| 1 | package Acme::Akashic::Records; | ||
| 2 | 2 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 3 | 2 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 2 | our $VERSION = sprintf "%d.%02d", q$Revision: 0.1 $ =~ /(\d+)/g; | |
| 5 | |||
| 6 | 2 | my $records; | |
| 7 | 2 | $records = \$records; | |
| 8 | 2 | bless $records, __PACKAGE__; | |
| 9 | |||
| 10 | 0 | ▶ | sub AUTOLOAD { $records } |
|
Subroutine
AUTOLOAD: not called CC=1 SCAR=6.9
| |||
| 11 | |||
| 12 | 2 | for my $type (qw/ARRAY HASH HANDLE/) { | |
| 13 | 2 | ▶ | no strict 'refs'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 14 | 6 | *{ __PACKAGE__ . '::' . $type . '::AUTOLOAD' } = \&AUTOLOAD; | |
| 15 | } | ||
| 16 | |||
| 17 | use overload | ||
| 18 | 0 | ▶ | '@{}' => sub { tie my @records, __PACKAGE__ . '::ARRAY'; \@records }, |
|
Subroutine
BEGIN: called CC=1 SCAR=3.3
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||
| 19 | 0 | ▶ | '%{}' => sub { tie my %records, __PACKAGE__ . '::HASH'; \%records }, |
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||
| 20 | 0 | ▶ | '*{}' => sub { tie *records, __PACKAGE__ . '::HANDLE'; \*records }, |
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||
| 21 | 0 | ▶ | '&{}' => sub { sub { $records } }, |
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||
| 22 | 2 | fallback => 1; | |
| 23 | |||
| 24 | 2 | $records; # End of Acme::Akashic::Records -- or do they ever end? | |
| 25 | __END__ | ||