1Package::Constants(3pm)Perl Programmers Reference GuidePackage::Constants(3pm)
2
3
4

NAME

6       Package::Constants - List all constants declared in a package
7

SYNOPSIS

9           use Package::Constants;
10
11           ### list the names of all constants in a given package;
12           @const = Package::Constants->list( __PACKAGE__ );
13           @const = Package::Constants->list( 'main' );
14
15           ### enable debugging output
16           $Package::Constants::DEBUG = 1;
17

DESCRIPTION

19       "Package::Constants" lists all the constants defined in a certain
20       package. This can be useful for, among others, setting up an
21       autogenerated "@EXPORT/@EXPORT_OK" for a Constants.pm file.
22

CLASS METHODS

24   @const = Package::Constants->list( PACKAGE_NAME );
25       Lists the names of all the constants defined in the provided package.
26

GLOBAL VARIABLES

28   $Package::Constants::DEBUG
29       When set to true, prints out debug information to STDERR about the
30       package it is inspecting. Helps to identify issues when the results are
31       not as you expect.
32
33       Defaults to false.
34

BUG REPORTS

36       Please report bugs or other issues to
37       <bug-package-constants@rt.cpan.org<gt>.
38

AUTHOR

40       This module by Jos Boumans <kane@cpan.org>.
41
43       This library is free software; you may redistribute and/or modify it
44       under the same terms as Perl itself.
45
46
47
48perl v5.16.3                      2013-02-26           Package::Constants(3pm)
Impressum