File: Intermediate.pm

package info (click to toggle)
libgraph-moreutils-perl 0.3.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 152 kB
  • sloc: perl: 385; makefile: 2
file content (24 lines) | stat: -rw-r--r-- 480 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package Graph::MoreUtils::Smooth::Intermediate;

# ABSTRACT: Container for intermediate vertices
our $VERSION = '0.3.0'; # VERSION

use strict;
use warnings;

use Scalar::Util qw( blessed );

sub new {
    my $class = shift;
    my $self = [ map { blessed $_ &&
                       $_->isa( Graph::MoreUtils::Smooth::Intermediate:: ) ? @$_ : $_ } @_ ];
    return bless $self, $class;
}

sub reverse {
    my( $self ) = @_;
    @$self = reverse @$self;
    return $self;
}

1;