Your IP : 216.73.216.74


Current Path : /usr/share/perl5/vendor_perl/Net/BGP/ASPath/
Upload File :
Current File : //usr/share/perl5/vendor_perl/Net/BGP/ASPath/AS_SEQUENCE.pm

#!/usr/bin/perl

package Net::BGP::ASPath::AS_SEQUENCE;

use strict;

## Inheritance and Versioning ##

@Net::BGP::ASPath::AS_SEQUENCE::ISA = qw( Net::BGP::ASPath::AS );
our $VERSION = '0.18';

sub type {
    return 2;
}

sub length {
    my $this = shift;
    return scalar @{$this};
}

sub asstring { as_string(@_) }

sub as_string {
    my $this = shift;
    return join(' ', @{$this});
}

sub asarray {
    my $this = shift;
    return [ @{$this} ];    # Unblessed version of list!
}

sub count {
    my $this = shift;

    return scalar(@{$this});
}

sub remove_tail {
    my ($this, $cnt) = @_;

    while ($cnt-- > 0) {
        pop @{$this};
    }

    return $this;
}

1;