line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# -*- Mode: perl -*- |
2
|
|
|
|
|
|
|
# |
3
|
|
|
|
|
|
|
# $Id: Flags.pm,v 0.1 2001/03/31 10:04:36 ram Exp $ |
4
|
|
|
|
|
|
|
# |
5
|
|
|
|
|
|
|
# Copyright (c) 2000-2001, Christophe Dehaudt & Raphael Manfredi |
6
|
|
|
|
|
|
|
# |
7
|
|
|
|
|
|
|
# You may redistribute only under the terms of the Artistic License, |
8
|
|
|
|
|
|
|
# as specified in the README file that comes with the distribution. |
9
|
|
|
|
|
|
|
# |
10
|
|
|
|
|
|
|
# HISTORY |
11
|
|
|
|
|
|
|
# $Log: Flags.pm,v $ |
12
|
|
|
|
|
|
|
# Revision 0.1 2001/03/31 10:04:36 ram |
13
|
|
|
|
|
|
|
# Baseline for first Alpha release. |
14
|
|
|
|
|
|
|
# |
15
|
|
|
|
|
|
|
# $EndLog$ |
16
|
|
|
|
|
|
|
# |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
package Carp::Datum::Flags; |
19
|
|
|
|
|
|
|
|
20
|
5
|
|
|
5
|
|
677
|
BEGIN { |
21
|
|
|
|
|
|
|
sub DBG_ON () {1}; |
22
|
|
|
|
|
|
|
sub DBG_OFF () {0}; |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub DTM_SET () {0}; |
25
|
|
|
|
|
|
|
sub DTM_CLEAR () {1}; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub DBG_ALL () {0xffffffff}; |
28
|
|
|
|
|
|
|
sub DBG_FLOW () {0x00000001}; # Control flow (entry/exit) |
29
|
|
|
|
|
|
|
sub DBG_RETURN () {0x00000002}; # Trace return value |
30
|
|
|
|
|
|
|
sub DBG_REQUIRE () {0x00000004}; # Check preconditions |
31
|
|
|
|
|
|
|
sub DBG_ASSERT () {0x00000008}; # Check plain assertions |
32
|
|
|
|
|
|
|
sub DBG_ENSURE () {0x00000010}; # Check postconditions |
33
|
|
|
|
|
|
|
sub DBG_TRACE () {0x00000020}; # Emit trace messages |
34
|
|
|
|
|
|
|
sub DBG_PANIC () {0x00000040}; # Panic on assertion failure |
35
|
|
|
|
|
|
|
sub DBG_STACK () {0x00000080}; # Dump stack trace on assert failure |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
5
|
|
|
5
|
|
127
|
BEGIN { |
39
|
|
|
|
|
|
|
sub TRC_ALL () {0xffffffff}; |
40
|
|
|
|
|
|
|
sub TRC_EMERGENCY () {0x00000001}; |
41
|
|
|
|
|
|
|
sub TRC_ALERT () {0x00000002}; |
42
|
|
|
|
|
|
|
sub TRC_CRITICAL () {0x00000004}; |
43
|
|
|
|
|
|
|
sub TRC_ERROR () {0x00000008}; |
44
|
|
|
|
|
|
|
sub TRC_WARNING () {0x00000010}; |
45
|
|
|
|
|
|
|
sub TRC_NOTICE () {0x00000020}; |
46
|
|
|
|
|
|
|
sub TRC_INFO () {0x00000040}; |
47
|
|
|
|
|
|
|
sub TRC_DEBUG () {0x00000080}; |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
require Exporter; |
51
|
5
|
|
|
5
|
|
32
|
use vars qw(@ISA @EXPORT); |
|
5
|
|
|
|
|
9
|
|
|
5
|
|
|
|
|
508
|
|
52
|
|
|
|
|
|
|
@ISA = qw(Exporter); |
53
|
|
|
|
|
|
|
@EXPORT = qw( |
54
|
|
|
|
|
|
|
DBG_ON |
55
|
|
|
|
|
|
|
DBG_OFF |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
DTM_SET |
58
|
|
|
|
|
|
|
DTM_CLEAR |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
DBG_ALL |
61
|
|
|
|
|
|
|
DBG_FLOW |
62
|
|
|
|
|
|
|
DBG_RETURN |
63
|
|
|
|
|
|
|
DBG_REQUIRE |
64
|
|
|
|
|
|
|
DBG_ASSERT |
65
|
|
|
|
|
|
|
DBG_ENSURE |
66
|
|
|
|
|
|
|
DBG_TRACE |
67
|
|
|
|
|
|
|
DBG_PANIC |
68
|
|
|
|
|
|
|
DBG_STACK |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
TRC_ALL |
71
|
|
|
|
|
|
|
TRC_EMERGENCY |
72
|
|
|
|
|
|
|
TRC_ALERT |
73
|
|
|
|
|
|
|
TRC_CRITICAL |
74
|
|
|
|
|
|
|
TRC_ERROR |
75
|
|
|
|
|
|
|
TRC_WARNING |
76
|
|
|
|
|
|
|
TRC_NOTICE |
77
|
|
|
|
|
|
|
TRC_INFO |
78
|
|
|
|
|
|
|
TRC_DEBUG |
79
|
|
|
|
|
|
|
); |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
1; |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
=head1 NAME |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
Carp::Datum::Flags - Flag Constants |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=head1 SYNOPSIS |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
# Used internally to define debugging and tracing flag constants |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=head1 DESCRIPTION |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
This module is used internally by C. It defines the |
94
|
|
|
|
|
|
|
constants that are exported and made available automatically to all |
95
|
|
|
|
|
|
|
users of C. |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
=head1 AUTHORS |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
Christophe Dehaudt and Raphael Manfredi are the original authors. |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
Send bug reports, hints, tips, suggestions to Dave Hoover at . |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
=head1 SEE ALSO |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
Carp::Datum(3). |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
=cut |
108
|
|
|
|
|
|
|
|