File Coverage

blib/lib/Graph/MoreUtils/Smooth/Intermediate.pm
Criterion Covered Total %
statement 13 16 81.2
branch 1 2 50.0
condition 1 3 33.3
subroutine 4 5 80.0
pod 0 2 0.0
total 19 28 67.8


line stmt bran cond sub pod time code
1             package Graph::MoreUtils::Smooth::Intermediate;
2              
3             # ABSTRACT: Container for intermediate vertices
4             our $VERSION = '0.3.0'; # VERSION
5              
6 9     9   79 use strict;
  9         19  
  9         422  
7 9     9   74 use warnings;
  9         21  
  9         536  
8              
9 9     9   60 use Scalar::Util qw( blessed );
  9         61  
  9         2161  
10              
11             sub new {
12 2     2 0 5 my $class = shift;
13 2 50 33     7 my $self = [ map { blessed $_ &&
  2         36  
14             $_->isa( Graph::MoreUtils::Smooth::Intermediate:: ) ? @$_ : $_ } @_ ];
15 2         10 return bless $self, $class;
16             }
17              
18             sub reverse {
19 0     0 0   my( $self ) = @_;
20 0           @$self = reverse @$self;
21 0           return $self;
22             }
23              
24             1;