autodie/Scope/Guard.pm

filter: Statementstmt 100% 12 / 12 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod 100% 1 / 1 totaltotal 100% 17 / 17 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
new
1.0
CRAP 1.0
« autodie/exception/system.pm ↑ Summary
1 package autodie::Scope::Guard;
2  
3 62 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 62 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 # ABSTRACT: Wrapper class for calling subs at end of scope
7 61 our $VERSION = '2.37'; # VERSION
8  
9 # This code schedules the cleanup of subroutines at the end of
10 # scope. It's directly inspired by chocolateboy's excellent
11 # Scope::Guard module.
12  
13 142 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
Pod documented
14 142 my ($class, $handler) = @_;
15 142 return bless($handler, $class);
16 }
17  
18 137 ▶sub DESTROY {
Subroutine DESTROY: called CC=1 SCAR=0.0
19 137 my ($self) = @_;
20  
21 137 $self->();
22 }
23  
24 61 1;
25  
26 __END__
« autodie/exception/system.pm ↑ Summary