1Package::Constants(3) User Contributed Perl DocumentationPackage::Constants(3)
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 pack‐
20       age. This can be useful for, among others, setting up an autogenerated
21       "@EXPORT/@EXPORT_OK" for a Constants.pm file.
22

CLASS METHODS

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

GLOBAL VARIABLES

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

AUTHOR

38       This module by Jos Boumans <kane@cpan.org>.
39
41       This module is copyright (c) 2004-2005 Jos Boumans <kane@cpan.org>.
42       All rights reserved.
43
44       This library is free software; you may redistribute and/or modify it
45       under the same terms as Perl itself.
46
47
48
49perl v5.8.8                       2005-09-06             Package::Constants(3)
Impressum