File Coverage

blib/lib/Attribute/Abstract.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 Attribute::Abstract;
2              
3 4     4   23 use warnings;
  4         8  
  4         146  
4 4     4   22 use strict;
  4         7  
  4         122  
5 4     4   22 use Attribute::Handlers;
  4         40  
  4         25  
6              
7             our $VERSION = sprintf "%d.%02d", q$Revision: 1.2 $ =~ /(\d+)/g;
8              
9             sub UNIVERSAL::Abstract :ATTR(CODE) {
10 2     2 0 7761 my ($pkg, $symbol) = @_;
11 4     4   333 no strict 'refs';
  4         7  
  4         539  
12 2         6 my $sub = $pkg . '::' . *{$symbol}{NAME};
  2         5  
13 2         10 *{$sub} = sub {
14 2     2   439 my ($file, $line) = (caller)[1,2];
15 2         43 die "call to abstract method $sub at $file line $line.\n";
16 2         13 };
17 4     4   21 }
  4         6  
  4         46  
18              
19             "Rosebud"; # for MARCEL's sake, not 1 -- dankogai
20              
21             __END__