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   94192 use 5.014000;
  7         22  
  7         222  
3 7     7   35 use strict;
  7         15  
  7         248  
4 7     7   39 use warnings;
  7         12  
  7         297  
5              
6             our $VERSION = "0.14";
7              
8 7     7   5380 use parent qw(Exporter);
  7         2362  
  7         40  
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   617 use Carp ();
  7         12  
  7         103  
17              
18 7     7   31 use XSLoader;
  7         12  
  7         1423  
19             XSLoader::load(__PACKAGE__, $VERSION);
20              
21             sub tap {
22 8     8 1 5077 my ($op, $root_op, $buf) = @_;
23 8 50       30 Carp::croak("Third argument should be ArrayRef") unless ref $buf eq 'ARRAY';
24 8         95 _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 35193 my ($self, $op) = @_;
31 4         1057 $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__