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