File Coverage

blib/lib/Plosurin/Utl/SetLinePos.pm
Criterion Covered Total %
statement 29 29 100.0
branch n/a
condition 2 2 100.0
subroutine 8 8 100.0
pod 0 1 0.0
total 39 40 97.5


line stmt bran cond sub pod time code
1             #===============================================================================
2             #
3             # DESCRIPTION: Utl visiter for setup nodes positions
4             #
5             # AUTHOR: Aliaksandr P. Zahatski, <zahatski@gmail.com>
6             #===============================================================================
7             package Plosurin::Utl::SetLinePos;
8 4     4   30 use strict;
  4         9  
  4         131  
9 4     4   21 use warnings;
  4         7  
  4         108  
10 4     4   22 use Plosurin::AbstractVisiter;
  4         8  
  4         95  
11 4     4   23 use base 'Plosurin::AbstractVisiter';
  4         9  
  4         404  
12 4     4   26 use Data::Dumper;
  4         8  
  4         197  
13 4     4   19 use vars qw($AUTOLOAD);
  4         8  
  4         732  
14             our $VERSION = '0.01';
15              
16              
17             sub Node {
18 35     35 0 58 my $self = shift;
19 35         47 my $n = shift;
20 35   100     128 my $line = $n->{matchline} + ( $self->{offset} || 0 );
21 35         52 my $src_file = $self->{srcfile};
22 35         55 foreach my $c (@{ $n->childs }) {
  35         92  
23 35         68 $c->{matchline} = $line;
24 35         70 $c->{srcfile} = $src_file;
25             }
26 35         129 $self->visit_childs($n);
27             }
28              
29             sub __default_method {
30 69     69   100 my $self =shift;
31 69         219 my $n = shift;
32              
33             }
34             1;
35