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   33 use strict;
  4         9  
  4         133  
9 4     4   27 use warnings;
  4         6  
  4         126  
10 4     4   22 use Plosurin::AbstractVisiter;
  4         8  
  4         98  
11 4     4   20 use base 'Plosurin::AbstractVisiter';
  4         7  
  4         500  
12 4     4   29 use Data::Dumper;
  4         9  
  4         240  
13 4     4   26 use vars qw($AUTOLOAD);
  4         10  
  4         761  
14             our $VERSION = '0.01';
15              
16              
17             sub Node {
18 35     35 0 58 my $self = shift;
19 35         52 my $n = shift;
20 35   100     132 my $line = $n->{matchline} + ( $self->{offset} || 0 );
21 35         61 my $src_file = $self->{srcfile};
22 35         49 foreach my $c (@{ $n->childs }) {
  35         88  
23 35         63 $c->{matchline} = $line;
24 35         69 $c->{srcfile} = $src_file;
25             }
26 35         116 $self->visit_childs($n);
27             }
28              
29             sub __default_method {
30 69     69   100 my $self =shift;
31 69         231 my $n = shift;
32              
33             }
34             1;
35