File Coverage

blib/lib/B/Tap.pm
Criterion Covered Total %
statement 23 24 95.8
branch 1 2 50.0
condition n/a
subroutine 8 9 88.8
pod 1 3 33.3
total 33 38 86.8


line stmt bran cond sub pod time code
1             package B::Tap;
2 7     7   61739 use 5.014000;
  7         17  
  7         255  
3 7     7   32 use strict;
  7         11  
  7         212  
4 7     7   147 use warnings;
  7         9  
  7         308  
5              
6             our $VERSION = "0.15";
7              
8 7     7   3277 use parent qw(Exporter);
  7         1600  
  7         33  
9              
10             our @EXPORT = qw(tap);
11             our @EXPORT_OK = qw(G_ARRAY G_VOID G_SCALAR);
12             our %EXPORT_TAGS = (
13             'all' => [@EXPORT, @EXPORT_OK],
14             );
15              
16 7     7   542 use Carp ();
  7         9  
  7         84  
17              
18 7     7   25 use XSLoader;
  7         6  
  7         1119  
19             XSLoader::load(__PACKAGE__, $VERSION);
20              
21             sub tap {
22 8     8 1 3537 my ($op, $root_op, $buf) = @_;
23 8 50       22 Carp::croak("Third argument should be ArrayRef") unless ref $buf eq 'ARRAY';
24 8         68 _tap($$op, $$root_op, $buf);
25             }
26              
27             # tweaks for custom ops.
28             {
29             sub B::Deparse::pp_b_tap_tap {
30 4     4 0 14880 my ($self, $op) = @_;
31 4         633 $self->deparse($op->first);
32             };
33             sub B::Deparse::pp_b_tap_push_sv {
34 0     0 0   '';
35             }
36             }
37              
38             1;
39             __END__