Netlist::Subclass(3)

πŸ¦‹ Netlist::Subclass(3) πŸ¦‹

okay bestie, welcome to Netlist::Subclass(3) β€” the manual-name corner is User Contributed Perl Documentation, and this page is lowkey the communal glue for the Verilog::Netlist::* classes. It’s giving β€œcommon routines for all classes”, periodt. πŸ’…

🌸 NAME 🌸

Verilog::Netlist::Subclass β€” common routines for all classes. No cap.

✨ SYNOPSIS ✨

Use it like this, bestie:

package Verilog::Netlist::Something;
use Verilog::Netlist::Subclass;
use base qw(Verilog::Netlist::Subclass);

...

$self->info("We're here\n");
$self->warn("Things look bad\n");
$self->error("Things are even worse\n");
$self->exit_if_error();

πŸ’– DESCRIPTION πŸ’–

Verilog::Netlist::Subclass is the base class for all the Verilog::Netlist::* structures β€” main character energy for the whole family. It’s mainly there so $self->warn() and $self->error() produce consistent results. That’s the whole vibe: consistent reporting, no chaos-gremlin output. 🫢

πŸŽ€ MEMBER FUNCTIONS πŸŽ€

  • $self->error(Text...) β€” prints an error in a standard format. It’s the β€œokay this is bad” announcement, but make it consistent. 😭
  • $self->errors() β€” returns the number of errors detected. The receipts, basically. πŸ’€
  • $self->exit_if_error() β€” exits the program if any errors were detected. It does not gently ask; it exits. πŸ”₯
  • $self->filename() β€” the filename number the entity was created in. Yes, β€œfilename number” β€” that’s the wording, bestie. πŸ“
  • $self->info(Text...) β€” prints an informational message in a standard format. Little status update moment. ✨
  • $self->lineno() β€” the line number the entity was created on. Location check! πŸ“
  • $self->logger() β€” the class to report errors using, generally a Verilog::Netlist::Logger object. It’s the reporting bestie. 🧚
  • $self->userdata(key), $self->userdata(key, data) β€” sets (with two arguments) or retrieves the specified key from an opaque hash. This may be used to store application data on the specified node. Opaque hash = mystery box, but useful. 🎁
  • $self->warn(Text...) β€” prints a warning in a standard format. The β€œhmm bestie, heads up” of the API. πŸ™ˆ
  • $self->warnings() β€” returns the number of warnings detected. Count ’em. 🌈

🌟 DISTRIBUTION 🌟

Verilog-Perl is part of the free Verilog EDA software tool suite at https://www.veripool.org/. The latest version is available from CPAN and from https://www.veripool.org/verilog-perl. πŸ’»βœ¨

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. πŸ“œ

πŸ‘‘ AUTHORS πŸ‘‘

Wilson Snyder <wsnyder@wsnyder.org>. Iconic. πŸ’œ

πŸ¦‹ SEE ALSO πŸ¦‹

Verilog-Perl, Verilog::Netlist. Go read those too, iykyk. 🌸


Cute little sign-off: this page came from perl v5.42.0, dated 2025-07-25 β€” bye bestie, go report consistently πŸ’…πŸŽ€

πŸ“¦ where this page comes from