File Coverage

blib/lib/Acme/EdError.pm
Criterion Covered Total %
statement 12 13 92.3
branch n/a
condition n/a
subroutine 6 7 85.7
pod 0 1 0.0
total 18 21 85.7


line stmt bran cond sub pod time code
1             # -*- Perl -*-
2             #
3             # Implements ed(1) error handling. Run perldoc(1) on this module for
4             # additional documentation.
5             #
6             # Copyright 2009,2012-2013,2015 by Jeremy Mates.
7             #
8             # This module is free software; you can redistribute it and/or modify it
9             # under the Artistic license.
10              
11             package Acme::EdError;
12              
13 1     1   16193 use strict;
  1         2  
  1         71  
14 1     1   6 use warnings;
  1         1  
  1         122  
15              
16             require 5.006;
17              
18             our $VERSION = '9.17';
19              
20             sub takeover_signals {
21 1     1 0 45 $SIG{__DIE__} = sub { print STDERR "?\n"; exit 255 };
  1     3   51  
  3         35  
22 3     0   96 $SIG{__WARN__} = sub { print STDERR "?\n"; };
  0            
23             }
24              
25             BEGIN {
26 1     1   4 takeover_signals();
27             }
28              
29             # And, in the event someone has taken the signals back...
30             takeover_signals();
31              
32             END {
33 1     1   4 takeover_signals();
34             }
35              
36             1;
37             __END__