File Coverage

blib/lib/VRML.pm
Criterion Covered Total %
statement 18 21 85.7
branch 4 6 66.6
condition 2 3 66.6
subroutine 4 4 100.0
pod 1 1 100.0
total 29 35 82.8


line stmt bran cond sub pod time code
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             require 5.000;
23 2     2   671 use strict;
  2         4  
  2         55  
24 2     2   6 use vars qw(@ISA $VERSION);
  2         3  
  2         402  
25             $VERSION="1.10";
26              
27             sub new {
28 12     12 1 37 my $class = shift;
29 12 50       57 my ($version) = @_ ? @_ : 0;
30 12         9 my $self;
31 12 100 66     47 if ( $version == 2 || $version == 97 ) {
    50          
32 6         515 require VRML::VRML2;
33 6         85 @ISA = qw(VRML::VRML2);
34 6         29 $self = new VRML::VRML2;
35             } elsif ( $version == 1 ) {
36 6         569 require VRML::VRML1;
37 6         46 @ISA = qw(VRML::VRML1);
38 6         18 $self = new VRML::VRML1;
39             } else {
40 0         0 require VRML::VRML1;
41 0         0 @ISA = qw(VRML::VRML1);
42 0         0 $self = new VRML::VRML1;
43             }
44 12         92 return bless $self, $class;
45             }
46              
47             sub DESTROY {
48 12     12   144 my $self = shift;
49             }
50             1;
51              
52             __END__