File Coverage

blib/lib/Lab/GenericSignals.pm
Criterion Covered Total %
statement 16 16 100.0
branch n/a
condition n/a
subroutine 6 6 100.0
pod 0 1 0.0
total 22 23 95.6


line stmt bran cond sub pod time code
1             package Lab::GenericSignals;
2             $Lab::GenericSignals::VERSION = '3.880';
3             #ABSTRACT: Signal handling
4              
5 9     9   143 use v5.20;
  9         31  
6              
7 9     9   51 use warnings;
  9         29  
  9         249  
8 9     9   47 use strict;
  9         22  
  9         440  
9              
10 9     9   5038 use sigtrap 'handler' => \&abort_all, qw(normal-signals error-signals);
  9         10789  
  9         79  
11              
12             sub abort_all {
13 9     9 0 44 foreach my $object ( @{Lab::Generic::OBJECTS} ) {
14 21         148 $object->abort();
15             }
16 7         34 @{Lab::Generic::OBJECTS} = ();
17 7         208 exit;
18             }
19              
20             END {
21 9     9   61177 abort_all();
22             }
23              
24             1;
25              
26             __END__
27              
28             =pod
29              
30             =encoding UTF-8
31              
32             =head1 NAME
33              
34             Lab::GenericSignals - Signal handling
35              
36             =head1 VERSION
37              
38             version 3.880
39              
40             =head1 COPYRIGHT AND LICENSE
41              
42             This software is copyright (c) 2023 by the Lab::Measurement team; in detail:
43              
44             Copyright 2014 Andreas K. Huettel
45             2015 Christian Butschkow
46             2016 Simon Reinhardt
47             2017 Andreas K. Huettel
48             2019 Simon Reinhardt
49             2020 Andreas K. Huettel
50              
51              
52             This is free software; you can redistribute it and/or modify it under
53             the same terms as the Perl 5 programming language system itself.
54              
55             =cut