.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Netlist::Logger 3pm" .TH Netlist::Logger 3pm 2024-01-27 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME Verilog::Netlist::Logger \- Error collection and reporting .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 1 \& use Verilog::Netlist::Logger; \& \& ... \& \& my $self = Verilog::Netlist::Logger\->new(); \& $self\->info("We\*(Aqre here\en"); \& $self\->warn("Things look bad\en"); \& $self\->error("Things are even worse\en"); \& $self\->exit_if_error(); .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" The Verilog::Netlist::Logger is used to report all errors detected by Verilog::Netlist::* structures. By default, Verilog::Netlist creates a new Logger object, and passes it down to all contained objects. Users may create their own logger objects to catch or otherwise handle error messages. .SH "MEMBER FUNCTIONS" .IX Header "MEMBER FUNCTIONS" .ie n .IP "$self\->error(object, \fIText...\fR)" 4 .el .IP "\f(CW$self\fR\->error(object, \fIText...\fR)" 4 .IX Item "$self->error(object, Text...)" Print an error about the object in a standard format. The object must have a fileline method. .ie n .IP $self\->exit_if_error([allow=>'warning']) 4 .el .IP \f(CW$self\fR\->exit_if_error([allow=>'warning']) 4 .IX Item "$self->exit_if_error([allow=>'warning'])" Exits the program if any errors were detected. Optionally specify allow=>'warning' to ignore warnings. .ie n .IP $self\->info(\fIText...\fR) 4 .el .IP \f(CW$self\fR\->info(\fIText...\fR) 4 .IX Item "$self->info(Text...)" Print an informational about the object in a standard format. The object must have a fileline method. .ie n .IP $self\->\fBlineno()\fR 4 .el .IP \f(CW$self\fR\->\fBlineno()\fR 4 .IX Item "$self->lineno()" The line number the entity was created on. .ie n .IP $self\->unlink_if_error(\fIfilename\fR) 4 .el .IP \f(CW$self\fR\->unlink_if_error(\fIfilename\fR) 4 .IX Item "$self->unlink_if_error(filename)" Requests the given file be deleted if any errors are detected when the Logger object is destroyed. Used for temporary files. .ie n .IP $self\->warn(\fIText...\fR) 4 .el .IP \f(CW$self\fR\->warn(\fIText...\fR) 4 .IX Item "$self->warn(Text...)" Print a warning about the object in a standard format. The object must have a fileline method. .SH DISTRIBUTION .IX Header "DISTRIBUTION" Verilog-Perl is part of the free Verilog EDA software tool suite. The latest version is available from CPAN and from . .PP Copyright 2000\-2024 by Wilson Snyder. This package is free software; you can redistribute it and/or modify it under the terms of either the GNU Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. .SH AUTHORS .IX Header "AUTHORS" Wilson Snyder .SH "SEE ALSO" .IX Header "SEE ALSO" Verilog-Perl, Verilog::Netlist, Verilog::Netlist::Subclass