| 1 | package Net::Cisco::ObjectGroup::ICMP; | ||||||||||||||||||||||||||||||||||||||||||
| 2 | 3 | ▶ | use base qw(Net::Cisco::ObjectGroup::Base); | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 3 | |||||||||||||||||||||||||||||||||||||||||||
| 4 | 3 | ▶ | use strict; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 5 | 3 | ▶ | use warnings FATAL => qw(all); | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 6 | |||||||||||||||||||||||||||||||||||||||||||
| 7 | 3 | ▶ | use Carp; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||||||||||||||||
| 9 | 4 | ▶ | sub _init { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_init: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 10 | 4 | my $self = shift; | |||||||||||||||||||||||||||||||||||||||||
| 11 | 4 | my $arg_ref = shift; | |||||||||||||||||||||||||||||||||||||||||
| 12 | |||||||||||||||||||||||||||||||||||||||||||
| 13 | 4 | $self->set_type( 'icmp-type' ); | |||||||||||||||||||||||||||||||||||||||||
| 14 | 4 | $self->SUPER::_init( $arg_ref ); | |||||||||||||||||||||||||||||||||||||||||
| 15 | |||||||||||||||||||||||||||||||||||||||||||
| 16 | 4 | return $self; | |||||||||||||||||||||||||||||||||||||||||
| 17 | } | ||||||||||||||||||||||||||||||||||||||||||
| 18 | |||||||||||||||||||||||||||||||||||||||||||
| 19 | 6 | ▶ | sub push { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
push: called CC=11 SCAR=24.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 20 | 6 | my $self = shift; | |||||||||||||||||||||||||||||||||||||||||
| 21 | 6 | my $arg_ref = shift; | |||||||||||||||||||||||||||||||||||||||||
| 22 | |||||||||||||||||||||||||||||||||||||||||||
| 23 | croak 'must specify either group-object or ICMP type' | ||||||||||||||||||||||||||||||||||||||||||
| 24 | if !defined $arg_ref->{group_object} | ||||||||||||||||||||||||||||||||||||||||||
| 25 | 6 | ▶ | and !defined $arg_ref->{icmp_type}; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
defined $arg_ref->{"group_object"} or defined $arg_ref->{"icmp_type"}
MC/DC100%2/2
defined $arg_ref->{"group_object"} or defined $arg_ref->{"icmp_type"}
defined $arg_ref->{"group_object"}
defined $arg_ref->{"icmp_type"}
Truth table100%3/3
A or B
A= defined $arg_ref->{"group_object"}B= defined $arg_ref->{"icmp_type"}
| |||||||||||||||||||||||||||||||||||||||||||
| 26 | |||||||||||||||||||||||||||||||||||||||||||
| 27 | croak 'cannot specify both group-object and ICMP type' | ||||||||||||||||||||||||||||||||||||||||||
| 28 | if defined $arg_ref->{group_object} | ||||||||||||||||||||||||||||||||||||||||||
| 29 | 5 | ▶ | and defined $arg_ref->{icmp_type}; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
defined $arg_ref->{"group_object"} and defined $arg_ref->{"icmp_type"}
MC/DC100%2/2
defined $arg_ref->{"group_object"} and defined $arg_ref->{"icmp_type"}
defined $arg_ref->{"group_object"}
defined $arg_ref->{"icmp_type"}
Truth table100%3/3
A and B
A= defined $arg_ref->{"group_object"}B= defined $arg_ref->{"icmp_type"}
| |||||||||||||||||||||||||||||||||||||||||||
| 30 | |||||||||||||||||||||||||||||||||||||||||||
| 31 | croak 'bad group-object' | ||||||||||||||||||||||||||||||||||||||||||
| 32 | if defined $arg_ref->{group_object} | ||||||||||||||||||||||||||||||||||||||||||
| 33 | 4 | ▶ | and ! UNIVERSAL::isa( $arg_ref->{group_object}, __PACKAGE__ ); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
defined $arg_ref->{"group_object"} and not UNIVERSAL::isa($arg_ref->{"group_object"}, __PACKAGE__)
MC/DC100%2/2
defined $arg_ref->{"group_object"} and not UNIVERSAL::isa($arg_ref->{"group_object"}, __PACKAGE__)
defined $arg_ref->{"group_object"}
not UNIVERSAL::isa($arg_ref->{"group_object"}, __PACKAGE__)
Truth table100%3/3
A and not(B)
A= defined $arg_ref->{"group_object"}B= not UNIVERSAL::isa($arg_ref->{"group_object"}, __PACKAGE__)
| |||||||||||||||||||||||||||||||||||||||||||
| 34 | |||||||||||||||||||||||||||||||||||||||||||
| 35 | |||||||||||||||||||||||||||||||||||||||||||
| 36 | $arg_ref->{icmp_type} | ||||||||||||||||||||||||||||||||||||||||||
| 37 | = __PACKAGE__->__dict->{$arg_ref->{icmp_type}} | ||||||||||||||||||||||||||||||||||||||||||
| 38 | if defined $arg_ref->{icmp_type} | ||||||||||||||||||||||||||||||||||||||||||
| 39 | and defined __PACKAGE__->__dict | ||||||||||||||||||||||||||||||||||||||||||
| 40 | 3 | ▶ | and exists __PACKAGE__->__dict->{$arg_ref->{icmp_type}}; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition83%5/6
defined $arg_ref->{"icmp_type"} and defined __PACKAGE__->__dict and exists __PACKAGE__->__dict->{$arg_ref->{"icmp_type"}}
defined $arg_ref->{"icmp_type"} and defined __PACKAGE__->__dict
MC/DC66%2/3
defined $arg_ref->{"icmp_type"} and defined __PACKAGE__->__dict and exists __PACKAGE__->__dict->{$arg_ref->{"icmp_type"}}
defined $arg_ref->{"icmp_type"}
defined __PACKAGE__->__dict
exists __PACKAGE__->__dict->{$arg_ref->{"icmp_type"}}
Truth table75%3/4
A and B and C
A= defined $arg_ref->{"icmp_type"}B= defined __PACKAGE__->__dictC= exists __PACKAGE__->__dict->{$arg_ref->{"icmp_type"}}
| |||||||||||||||||||||||||||||||||||||||||||
| 41 | |||||||||||||||||||||||||||||||||||||||||||
| 42 | my $line = defined $arg_ref->{icmp_type} | ||||||||||||||||||||||||||||||||||||||||||
| 43 | ? "icmp-object $arg_ref->{icmp_type}" | ||||||||||||||||||||||||||||||||||||||||||
| 44 | 3 | ▶ | : 'group-object '. $arg_ref->{group_object}->get_name; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 45 | |||||||||||||||||||||||||||||||||||||||||||
| 46 | 3 | push @{$self->get_objs}, $line; | |||||||||||||||||||||||||||||||||||||||||
| 47 | |||||||||||||||||||||||||||||||||||||||||||
| 48 | 3 | return $self; | |||||||||||||||||||||||||||||||||||||||||
| 49 | } | ||||||||||||||||||||||||||||||||||||||||||
| 50 | |||||||||||||||||||||||||||||||||||||||||||
| 51 | 3 | 1; | |||||||||||||||||||||||||||||||||||||||||
| 52 | |||||||||||||||||||||||||||||||||||||||||||
| 53 | # Copyright (c) The University of Oxford 2006. All Rights Reserved. | ||||||||||||||||||||||||||||||||||||||||||
| 54 | # | ||||||||||||||||||||||||||||||||||||||||||
| 55 | # This program is free software; you can redistribute it and/or modify it | ||||||||||||||||||||||||||||||||||||||||||
| 56 | # under the terms of version 2 of the GNU General Public License as published | ||||||||||||||||||||||||||||||||||||||||||
| 57 | # by the Free Software Foundation. | ||||||||||||||||||||||||||||||||||||||||||
| 58 | # | ||||||||||||||||||||||||||||||||||||||||||
| 59 | # This program is distributed in the hope that it will be useful, but WITHOUT | ||||||||||||||||||||||||||||||||||||||||||
| 60 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||||||||||||||||||||||||||||||||||||||||||
| 61 | # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||||||||||||||||||||||||||||||||||||||||||
| 62 | # more details. | ||||||||||||||||||||||||||||||||||||||||||
| 63 | # | ||||||||||||||||||||||||||||||||||||||||||
| 64 | # You should have received a copy of the GNU General Public License along with | ||||||||||||||||||||||||||||||||||||||||||
| 65 | # this program; if not, write to the Free Software Foundation, Inc., 51 | ||||||||||||||||||||||||||||||||||||||||||
| 66 | # Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||||||||||||||||||||||||||||||||||||||||||
| 67 | |||||||||||||||||||||||||||||||||||||||||||
| 68 | __DATA__ | ||||||||||||||||||||||||||||||||||||||||||