ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/src/Utilities/Verbose.pm
Revision: 1.1.2.2
Committed: Wed Apr 19 14:20:49 2000 UTC (25 years ago) by williamc
Content type: text/plain
Branch: V0_9branch
CVS Tags: V0_13_3, V0_13_2, V0_12_12_2, V0_12_12_1, V0_12_12_0, PlayGround_0, V0_13_1, V0_13_0, V0_12_12, V0_12_11, V0_12_9b, V0_12_10, V0_12_9, V0_12_8, V0_12_7, V0_12_6, V0_12_5, V0_12_4, V0_12_3, V0_12_2, V0_12_1, V0_12_0
Branch point for: HPWbranch
Changes since 1.1.2.1: +7 -0 lines
Log Message:
Add error routine

File Contents

# User Rev Content
1 williamc 1.1.2.1 #
2     # Verbose.pm
3     #
4     # Originally Written by Christopher Williams
5     #
6     # Description
7     # -----------
8     # Simple multi parsing functionality
9     #
10     # Interface
11     # ---------
12     # new() : A new ActiveDoc object
13     # verbose(string) : Print string in verbosity mode
14     # verbosity(0|1) : verbosity off|on
15    
16     package Utilities::Verbose;
17     require 5.004;
18    
19     sub new {
20     my $class=shift;
21     $self={};
22     bless $self, $class;
23     $self->verbose("New ".ref($self)." Created");
24     return $self;
25     }
26    
27     sub verbosity {
28     my $self=shift;
29     $self->{verbose}=shift;
30     }
31    
32     sub verbose {
33     my $self=shift;
34     my $string=shift;
35    
36     if ( $self->{verbose} ) {
37     print ">".ref($self)."($self) : \n->".$string."\n";
38     }
39     }
40    
41 williamc 1.1.2.2 sub error {
42     my $self=shift;
43     my $string=shift;
44    
45     print $string."\n";
46     exit 1;
47     }