Packag...stants(3pm)

πŸ“¦
version 0.06 Β· 6 versions
, in ubuntu noble, ubuntu resolute, ubuntu stonking

✨ NAME ✨

Package::Constants β€” bestie, this one just lists all the constants declared in a package πŸ’– like it'll go through the whole thing and hand you the receipts.


🌸 SYNOPSIS 🌸

okay so here's the vibe, straight up:

use Package::Constants;

### list the names of all constants in a given package;
@const = Package::Constants->list( __PACKAGE__ );
@const = Package::Constants->list( 'main' );

### enable debugging output
$Package::Constants::DEBUG = 1;

πŸ’… DESCRIPTION πŸ’…

Package::Constants lists all the constants defined in a certain package. it's giving very much "here's every constant, no cap" πŸ”₯

and like, why do you care? because it's lowkey perfect for, among other things, setting up an autogenerated @EXPORT/@EXPORT_OK for a Constants.pm file. iconic behavior honestly πŸ‘‘


πŸ¦‹ CLASS METHODS πŸ¦‹

@const = Package::Constants->list( PACKAGE_NAME );

Lists the names of all the constants defined in the provided package. that's it, that's the whole job, and it ate πŸ’…βœ¨


🌈 GLOBAL VARIABLES 🌈

$Package::Constants::DEBUG

When set to true, prints out debug information to STDERR about the package it is inspecting. helps to identify issues when the results are not as you expect 😭 fr fr, this is your bestie when something's acting sus and you can't figure out why.

Defaults to false. 🫢


πŸ‘€ SEE ALSO πŸ‘€

  • Module::Functions β€” get a list of all the public functions defined in a package. (different vibe, same energy, iykyk)

πŸ’€ BUG REPORTS πŸ’€

Please report bugs or other issues to bug-package-constants@rt.cpan.org β€” not me, bestie, i'm just the messenger πŸ™ˆ

(the original page spells it out as <bug-package-constants@rt.cpan.org<gt>, so like, that's what it says, don't come for me πŸ’–)

πŸŽ€ AUTHOR πŸŽ€

This module by Jos Boumans <kane@cpan.org>. king shit πŸ‘‘


This library is free software; you may redistribute and/or modify it under the same terms as Perl itself. periodt πŸ’œ


and that's the whole page, bestie!! πŸ¦‹βœ¨

this was Packag...stants(3pm) from the User Contributed Perl Documentation, straight outta perl v5.36.0, dated 2022-10-13 β€” go forth and list ur constants, mwah πŸ’‹πŸŒΈ

πŸ“¦ where this page comes from