ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/src/Utilities/Verbose.pm
Revision: 1.2
Committed: Mon Aug 28 08:35:17 2000 UTC (24 years, 8 months ago) by williamc
Content type: text/plain
Branch: MAIN
Changes since 1.1: +51 -0 lines
Log Message:
remove Interface.pm

File Contents

# User Rev Content
1 williamc 1.2 #
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     if ( @_ ) {
30     $self->{verbose}=shift;
31     }
32     $self->{verbose};
33    
34     }
35    
36     sub verbose {
37     my $self=shift;
38     my $string=shift;
39    
40     if ( $self->{verbose} ) {
41     print ">".ref($self)."($self) : \n->".$string."\n";
42     }
43     }
44    
45     sub error {
46     my $self=shift;
47     my $string=shift;
48    
49     print $string."\n";
50     exit 1;
51     }