perl-Const-Exporter - Declare constants for export

Property Value
Distribution ALT Linux Sisyphus
Repository Autoimports noarch
Package filename perl-Const-Exporter-0.4.1-alt1.noarch.rpm
Package name perl-Const-Exporter
Package version 0.4.1
Package release alt1
Package architecture noarch
Package type rpm
Category Development/Perl
Homepage -
License -
Maintainer -
Download size 31.04 KB
Installed size 31.04 KB
This module allows you to declare constants that can be exported to
other modules.
To declare constants, simply group then into export tags:
package MyApp::Constants;
use Const::Exporer
tag_a => [
'foo' => 1,
'bar' => 2,
tag_b => [
'baz' => 3,
default => [
Constants in the "default" tag are exported by default (that is, they are added
to the `@EXPORTS' array).
When a constant is already defined in a previous tag, then no value is
specified for it. (For example, "bar" in "tab_b" above.)  If you do
give a value, the Const::Exporter manpage will assume it's another symbol.
Your module can include multiple calls to `use Const::Exporter', so
that you can reference constants in other expressions, e.g.
use Const::Exporter
tag => [
'$zero' => 0,
use Const::Exporter
tag => [
'$one' => 1 + $zero,
or even something more complex:
use Const::Exporter
http_ports => [
'HTTP'     => 80,
'HTTP_ALT' => 8080,
'HTTPS'    => 443,
use Const::Exporter
http_ports => [
Constants can include traditional the constant manpage symbols, as well as
scalars, arrays or hashes.
Constants can include values defined elsewhere in the code, e.g.
our $foo;
$foo = calculate_value_for_constant();
use Const::Exporer
tag => [ '$foo' ];
Note that this will make the symbol read-only. You don't need to
explicitly declare it as such.
Enumerated constants are also supported:
use Const::Exporer
tag => [
[qw/ foo bar baz /] => 1,
will define the symbols "foo" (1), "bar" (2) and "baz" (3).
You can also specify a list of numbers, if you want to skip values:
use Const::Exporer
tag => [
[qw/ foo bar baz /] => [1, 4],
will define the symbols "foo" (1), "bar" (4) and "baz" (5).
You can even specify string values:
use Const::Exporer
tag => [
[qw/ foo bar baz /] => [qw/ feh meh neh /],
however, this is equivalent to
use Const::Exporer
tag => [
'foo' => 'feh',
'bar' => 'meh',
'baz' => 'neh',


Package Version Architecture Repository
perl-Const-Exporter - - -


Name Value
/usr/share/perl5 -
perl(Const/ -
perl(List/ >= 0.100
perl(Package/ -
perl(Ref/ -
perl-base >= 1:5.10.0
rpmlib(PayloadIsLzma) -


Name Value
perl(Const/ = 0.004.001
perl-Const-Exporter = 0.4.1-alt1


Type URL
Binary Package perl-Const-Exporter-0.4.1-alt1.noarch.rpm
Source Package perl-Const-Exporter-0.4.1-alt1.src.rpm

Install Howto

  1. Add the following line to /etc/apt/sources.list:
    rpm [Sisyphus] noarch autoimports
    rpm [Sisyphus] noarch autoimports
  2. Update the package index:
    # sudo apt-get update
  3. Install perl-Const-Exporter rpm package:
    # sudo apt-get install perl-Const-Exporter



See Also

Package Description
perl-Const-Fast-Exporter-0.01-alt1.noarch.rpm create a module that exports Const::Fast immutable variables
perl-Constant-Export-Lazy-0.17-alt1.noarch.rpm Utility to write lazy exporters of constant subroutines
perl-Constant-Exporter-0.01-alt1.noarch.rpm define and export constants easily
perl-Constant-FromGlobal-0.09-alt2.noarch.rpm declare constant(s) with value from global or environment variable
perl-Constant-Generate-0.17-alt1_4.noarch.rpm Common tasks for symbolic constants
perl-Constant-Generator-1.013-alt1.noarch.rpm this module bring flexible (I hope) constant generator to You
perl-Constructible-0.02-alt1.noarch.rpm Provides an interface to Maxima(full-featured CAS) as well as means to visualize and compute constr
perl-Consul-Simple-1.142430-alt1.noarch.rpm Easy access to Consul (
perl-Contenticious-0.393-alt1.noarch.rpm build web sites from markdown files
perl-Contenticious-scripts-0.393-alt1.noarch.rpm Contenticious scripts
perl-Context-Handle-0.01-alt1.noarch.rpm A convenient context propagation proxy thingy
perl-Context-Micro-0.01-alt1.noarch.rpm Micro Context Class
perl-Context-Set-0.02-alt1.noarch.rpm A Contextual preference/configuration holder
perl-Context-Singleton-1.0.5-alt1.noarch.rpm handles context specific singletons
perl-Contextual-Call-0.01-alt1.noarch.rpm call sub with caller's context