File Coverage

blib/lib/Graph/Traversal/DFS.pm
Criterion Covered Total %
statement 17 17 100.0
branch n/a
condition n/a
subroutine 6 6 100.0
pod 0 2 0.0
total 23 25 92.0


line stmt bran cond sub pod time code
1             package Graph::Traversal::DFS;
2              
3 12     12   704 use strict;
  12         24  
  12         494  
4 12     12   62 use warnings;
  12         22  
  12         830  
5              
6 12     12   6382 use Graph::Traversal;
  12         43  
  12         574  
7 12     12   102 use base 'Graph::Traversal';
  12         22  
  12         2729  
8              
9             sub current {
10 2276     2276 0 3860 my $self = shift;
11 2276         6939 $self->{ order }->[ -1 ];
12             }
13              
14             sub see {
15 1271     1271 0 2256 my $self = shift;
16 1271         2134 pop @{ $self->{ order } };
  1271         5454  
17             }
18              
19             *dfs = \&Graph::Traversal::postorder;
20              
21             1;
22             __END__