File Coverage

blib/lib/Attribute/SigHandler.pm
Criterion Covered Total %
statement 15 15 100.0
branch 1 2 50.0
condition n/a
subroutine 5 5 100.0
pod 0 1 0.0
total 21 23 91.3


line stmt bran cond sub pod time code
1             package Attribute::SigHandler;
2              
3 4     4   21 use warnings;
  4         7  
  4         122  
4 4     4   23 use strict;
  4         8  
  4         121  
5 4     4   23 use Attribute::Handlers;
  4         5  
  4         23  
6              
7             our $VERSION = sprintf "%d.%02d", q$Revision: 1.2 $ =~ /(\d+)/g;
8              
9             sub UNIVERSAL::SigHandler : ATTR(CODE) {
10 3     3 0 3581 my ($symbol, $data) = @_[1,4];
11 3 50       13 $SIG{$_} = *{$symbol}{NAME} for ref $data eq 'ARRAY' ? @$data : $data;
  4         52  
12 4     4   1016 }
  4         13  
  4         23  
13              
14             "Rosebud"; # for MARCEL's sake, not 1 -- dankogai
15              
16             __END__