blib/lib/PDL/Perldl2/Plugin/NiceSlice.pm untested

filter: Statementstmt 0.0% 0 / 26 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 5 Podpod n/a totaltotal 0.0% 0 / 31 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 package PDL::Perldl2::Plugin::NiceSlice;
2  
3 use Devel::REPL::Plugin;
4  
5 use namespace::clean -except => [ 'meta' ];
6  
7 use PDL::Lite;
8 use PDL::NiceSlice;
9  
10 my $preproc = sub {
11 my ($txt) = @_;
12 my $new = PDL::NiceSlice::perldlpp('main',$txt);
13 return $new;
14 };
15  
16 around 'compile' => sub {
17  
18 my ($orig, $self) = (shift, shift);
19 my ($lines, @args) = @_;
20  
21 no PDL::NiceSlice;
22 $lines = $preproc->($lines);
23  
24 $self->$orig($lines, @args);
25 };
26  
27 1;
28  
29 __END__