File Coverage

blib/lib/ExtUtils/XSpp/Node/Preprocessor.pm
Criterion Covered Total %
statement 15 15 100.0
branch 2 2 100.0
condition n/a
subroutine 6 6 100.0
pod 2 3 66.6
total 25 26 96.1


line stmt bran cond sub pod time code
1             package ExtUtils::XSpp::Node::Preprocessor;
2 21     21   102 use strict;
  21         43  
  21         558  
3 21     21   63 use warnings;
  21         32  
  21         898  
4 21     21   89 use base 'ExtUtils::XSpp::Node::Raw';
  21         56  
  21         539  
5              
6             sub init {
7 22     22 1 23 my $this = shift;
8 22         50 my %args = @_;
9              
10 22         63 $this->SUPER::init( %args );
11 22         51 $this->{SYMBOL} = $args{symbol};
12             }
13              
14             sub print {
15 22 100   22 1 34 $_[0]->rows->[0] . "\n" .
16             ( $_[0]->symbol ? '#define ' . $_[0]->symbol . "\n\n" : "\n" )
17             }
18              
19 34     34 0 85 sub symbol { $_[0]->{SYMBOL} }
20              
21             1;