1Netlist::Logger(3) User Contributed Perl Documentation Netlist::Logger(3)
2
3
4
6 Verilog::Netlist::Logger - Error collection and reporting
7
9 use Verilog::Netlist::Logger;
10
11 ...
12
13 my $self = Verilog::Netlist::Logger->new();
14 $self->info("We're here\n");
15 $self->warn("Things look bad\n");
16 $self->error("Things are even worse\n");
17 $self->exit_if_error();
18
20 The Verilog::Netlist::Logger is used to report all errors detected by
21 Verilog::Netlist::* structures. By default, Verilog::Netlist creates a
22 new Logger object, and passes it down to all contained objects. Users
23 may create their own logger objects to catch or otherwise handle error
24 messages.
25
27 $self->error(object, Text...)
28 Print an error about the object in a standard format. The object
29 must have a fileline method.
30
31 $self->exit_if_error([allow=>'warning'])
32 Exits the program if any errors were detected. Optionally specify
33 allow=>'warning' to ignore warnings.
34
35 $self->info(Text...)
36 Print an informational about the object in a standard format. The
37 object must have a fileline method.
38
39 $self->lineno()
40 The line number the entity was created on.
41
42 $self->unlink_if_error(filename)
43 Requests the given file be deleted if any errors are detected when
44 the Logger object is destroyed. Used for temporary files.
45
46 $self->warn(Text...)
47 Print a warning about the object in a standard format. The object
48 must have a fileline method.
49
51 Verilog-Perl is part of the <https://www.veripool.org/> free Verilog
52 EDA software tool suite. The latest version is available from CPAN and
53 from <https://www.veripool.org/verilog-perl>.
54
55 Copyright 2000-2021 by Wilson Snyder. This package is free software;
56 you can redistribute it and/or modify it under the terms of either the
57 GNU Lesser General Public License Version 3 or the Perl Artistic
58 License Version 2.0.
59
61 Wilson Snyder <wsnyder@wsnyder.org>
62
64 Verilog-Perl, Verilog::Netlist, Verilog::Netlist::Subclass
65
66
67
68perl v5.32.1 2021-04-14 Netlist::Logger(3)