blib/lib/Seis/Sub.pm untested

filter: Statementstmt 0.0% 0 / 25 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 8 Podpod 0.0% 0 / 3 totaltotal 0.0% 0 / 36 CC 1 SCAR 6.9
CC
1
Cov
0%
_new
2.0
name
2.0
nextwith
2.0
CRAP 2.0
1 package Seis::Sub;
2 use strict;
3 use warnings;
4 use utf8;
5 use 5.010_001;
6  
7 package # Hide from PAUSE
8 Sub;
9  
10 use B;
11  
12 sub _new {
13 my ($class, $code) = @_;
14 bless {code => $code}, $class;
15 }
16  
17 sub name {
18 my $self = shift;
19 my $coderef = $self->{code};
20 my $b = B::svref_2object($coderef);
21 my $cvflags = $b->CvFLAGS;
22 '&'.join('::', $b->GV->STASH->NAME, $b->GV->NAME);
23 }
24  
25 sub nextwith {
26 my $code = shift;
27 goto $code;
28 }
29  
30 1;
31 __END__