| 1 | package VRML; | ||||||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||||||
| 3 | ############################## Copyright ############################## | ||||||||||||||||||||||||||||||||
| 4 | # # | ||||||||||||||||||||||||||||||||
| 5 | # This program is Copyright 1996,1998 by Hartmut Palm. # | ||||||||||||||||||||||||||||||||
| 6 | # This program is free software; you can redistribute it and/or # | ||||||||||||||||||||||||||||||||
| 7 | # modify it under the terms of the GNU General Public License # | ||||||||||||||||||||||||||||||||
| 8 | # as published by the Free Software Foundation; either version 2 # | ||||||||||||||||||||||||||||||||
| 9 | # of the License, or (at your option) any later version. # | ||||||||||||||||||||||||||||||||
| 10 | # # | ||||||||||||||||||||||||||||||||
| 11 | # This program is distributed in the hope that it will be useful, # | ||||||||||||||||||||||||||||||||
| 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # | ||||||||||||||||||||||||||||||||
| 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # | ||||||||||||||||||||||||||||||||
| 14 | # GNU General Public License for more details. # | ||||||||||||||||||||||||||||||||
| 15 | # # | ||||||||||||||||||||||||||||||||
| 16 | # If you do not have a copy of the GNU General Public License write # | ||||||||||||||||||||||||||||||||
| 17 | # to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, # | ||||||||||||||||||||||||||||||||
| 18 | # MA 02139, USA. # | ||||||||||||||||||||||||||||||||
| 19 | # # | ||||||||||||||||||||||||||||||||
| 20 | ####################################################################### | ||||||||||||||||||||||||||||||||
| 21 | |||||||||||||||||||||||||||||||||
| 22 | 2 | require 5.000; | |||||||||||||||||||||||||||||||
| 23 | 2 | ▶ | use strict; | ||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 24 | 2 | ▶ | use vars qw(@ISA $VERSION); | ||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 25 | 2 | $VERSION="1.10"; | |||||||||||||||||||||||||||||||
| 26 | |||||||||||||||||||||||||||||||||
| 27 | 12 | ▶ | sub new { | ||||||||||||||||||||||||||||||
|
Subroutine
new: called CC=5 SCAR=16.9
Pod
documented
| |||||||||||||||||||||||||||||||||
| 28 | 12 | my $class = shift; | |||||||||||||||||||||||||||||||
| 29 | 12 | ▶ | my ($version) = @_ ? @_ : 0; | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 30 | 12 | my $self; | |||||||||||||||||||||||||||||||
| 31 | 12 | ▶ | if ( $version == 2 || $version == 97 ) { | ||||||||||||||||||||||||||||||
|
Branch: 2 branches
Condition66%2/3
$version == 2 or $version == 97
MC/DC50%1/2
$version == 2 or $version == 97
$version == 2
$version == 97
Truth table66%2/3
A or B
A= $version == 2B= $version == 97
| |||||||||||||||||||||||||||||||||
| 32 | 6 | require VRML::VRML2; | |||||||||||||||||||||||||||||||
| 33 | 6 | @ISA = qw(VRML::VRML2); | |||||||||||||||||||||||||||||||
| 34 | 6 | $self = new VRML::VRML2; | |||||||||||||||||||||||||||||||
| 35 | } elsif ( $version == 1 ) { | ||||||||||||||||||||||||||||||||
| 36 | 6 | require VRML::VRML1; | |||||||||||||||||||||||||||||||
| 37 | 6 | @ISA = qw(VRML::VRML1); | |||||||||||||||||||||||||||||||
| 38 | 6 | $self = new VRML::VRML1; | |||||||||||||||||||||||||||||||
| 39 | } else { | ||||||||||||||||||||||||||||||||
| 40 | 0 | require VRML::VRML1; | |||||||||||||||||||||||||||||||
| 41 | 0 | @ISA = qw(VRML::VRML1); | |||||||||||||||||||||||||||||||
| 42 | 0 | $self = new VRML::VRML1; | |||||||||||||||||||||||||||||||
| 43 | } | ||||||||||||||||||||||||||||||||
| 44 | 12 | return bless $self, $class; | |||||||||||||||||||||||||||||||
| 45 | } | ||||||||||||||||||||||||||||||||
| 46 | |||||||||||||||||||||||||||||||||
| 47 | 12 | ▶ | sub DESTROY { | ||||||||||||||||||||||||||||||
|
Subroutine
DESTROY: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 48 | 12 | my $self = shift; | |||||||||||||||||||||||||||||||
| 49 | } | ||||||||||||||||||||||||||||||||
| 50 | 2 | 1; | |||||||||||||||||||||||||||||||
| 51 | |||||||||||||||||||||||||||||||||
| 52 | __END__ | ||||||||||||||||||||||||||||||||