| 1 | #!/usr/bin/perl | ||||||||||
| 2 | |||||||||||
| 3 | package Net::BGP::ASPath::AS_SEQUENCE; | ||||||||||
| 4 | |||||||||||
| 5 | 7 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | |||||||||||
| 7 | ## Inheritance and Versioning ## | ||||||||||
| 8 | |||||||||||
| 9 | 7 | @Net::BGP::ASPath::AS_SEQUENCE::ISA = qw( Net::BGP::ASPath::AS ); | |||||||||
| 10 | 7 | our $VERSION = '0.16'; | |||||||||
| 11 | |||||||||||
| 12 | sub type { | ||||||||||
| 13 | 18 | ▶ | return 2; | ||||||||
|
Subroutine
type: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 14 | } | ||||||||||
| 15 | |||||||||||
| 16 | sub length { | ||||||||||
| 17 | 66 | ▶ | my $this = shift; | ||||||||
|
Subroutine
length: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 18 | 66 | return scalar @{$this}; | |||||||||
| 19 | } | ||||||||||
| 20 | |||||||||||
| 21 | 0 | ▶ | sub asstring { as_string(@_) } | ||||||||
|
Subroutine
asstring: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 22 | |||||||||||
| 23 | sub as_string { | ||||||||||
| 24 | 566 | ▶ | my $this = shift; | ||||||||
|
Subroutine
as_string: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 25 | 566 | return join(' ', @{$this}); | |||||||||
| 26 | } | ||||||||||
| 27 | |||||||||||
| 28 | sub asarray { | ||||||||||
| 29 | 60 | ▶ | my $this = shift; | ||||||||
|
Subroutine
asarray: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 30 | 60 | return [ @{$this} ]; # Unblessed version of list! | |||||||||
| 31 | } | ||||||||||
| 32 | |||||||||||
| 33 | sub count { | ||||||||||
| 34 | 0 | ▶ | my $this = shift; | ||||||||
|
Subroutine
count: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 35 | |||||||||||
| 36 | 0 | return scalar(@{$this}); | |||||||||
| 37 | } | ||||||||||
| 38 | |||||||||||
| 39 | sub remove_tail { | ||||||||||
| 40 | 3 | ▶ | my ($this, $cnt) = @_; | ||||||||
|
Subroutine
remove_tail: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||
| 41 | |||||||||||
| 42 | 3 | ▶ | while ($cnt-- > 0) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 43 | 3 | pop @{$this}; | |||||||||
| 44 | } | ||||||||||
| 45 | |||||||||||
| 46 | 3 | return $this; | |||||||||
| 47 | } | ||||||||||
| 48 | |||||||||||
| 49 | 7 | 1; | |||||||||
| 50 | |||||||||||