perl-Devel-Constants - translates constants back to named symbols

Property Value
Distribution ALT Linux Sisyphus
Repository Autoimports noarch
Package filename perl-Devel-Constants-1.04-alt2.noarch.rpm
Package name perl-Devel-Constants
Package version 1.04
Package release alt2
Package architecture noarch
Package type rpm
Category Development/Perl
Homepage -
License -
Maintainer -
Download size 26.48 KB
Installed size 26.48 KB
Declaring constants is very convenient for writing programs, but as Perl often
inlines them, retrieving their symbolic names can be tricky.  This worse with
lowlevel modules that use constants for bit-twiddling.
Devel::Constants makes this much more manageable.
It silently wraps around the the constant manpage module, intercepting all constant
declarations.  It builds a hash, associating the values to their names, from
which you can retrieve their names as necessary.
Note that you must use Devel::Constants *before* `constant', or the magic
will not work and you will be very disappointed.  This is very important, and
if you ignore this warning, the authors will feel free to laugh at you (at
least a little.
By default, Devel::Constants only intercept constant declarations within the
same package that used the module.  Also by default, it stores the constants
for a package within a private (read, otherwise inaccessible) variable.  You
can override both of these.
Passing the `package' flag to Devel::Constants with a valid package name will
make the module intercept all constants subsequently declared within that
package.  For example, in the main package you might say:
use Devel::Constants package => NetPacket::TCP;
use NetPacket::TCP;
All of the TCP flags declared within the NetPacket::TCP manpage are now available.
It is also possible to pass in a hash reference in which to store the constant
values and names:
my %constant_map;
use Devel::Constants \%constant_map;
use constant NAME_=> 1;
use constant RANK_=> 2;
use constant SERIAL_=> 4;
print join(' ', values %constant_map), "\n";


Package Version Architecture Repository
perl-Devel-Constants - - -


Name Value
/usr/share/perl5 -
perl( -
perl( -
rpmlib(PayloadIsLzma) -


Name Value
perl(Devel/ = 1.040
perl-Devel-Constants = 1.04-alt2


Type URL
Binary Package perl-Devel-Constants-1.04-alt2.noarch.rpm
Source Package perl-Devel-Constants-1.04-alt2.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-Devel-Constants rpm package:
    # sudo apt-get install perl-Devel-Constants



See Also

Package Description
perl-Devel-CoreStack-1.3-alt2_9.noarch.rpm Try to generate a stack dump from a core file
perl-Devel-Cover-Report-Clover-1.01-alt1.noarch.rpm Backend for Clover reporting of coverage statistics
perl-Devel-Cover-Report-Codecov-0.25-alt1.noarch.rpm Backend for Codecov reporting of coverage statistics
perl-Devel-Cover-Report-Coveralls-0.11-alt1.noarch.rpm coveralls backend for Devel::Cover
perl-Devel-Cover-Report-Json_detailed-0.001000-alt1.noarch.rpm Generate a comprehensive JSON file articulating the full contents of a coverage run
perl-Devel-Cover-Report-Kritika-0.05-alt1.noarch.rpm Cover reporting to Kritika
perl-Devel-Cover-Report-OwnServer-0.4.1-alt1.noarch.rpm Post test coverage summary to selected service
perl-Devel-Cover-Report-Phabricator-0.01-alt1.noarch.rpm Produce Phabricator-compatible coverage reports
perl-Devel-Cover-Report-SonarGeneric-0.3-alt1.noarch.rpm SonarQube generic backend for Devel::Cover
perl-Devel-CoverReport-0.05-alt1.noarch.rpm Advanced coverage reports based on Devel::Cover
perl-Devel-CoverReport-scripts-0.05-alt1.noarch.rpm Devel-CoverReport scripts
perl-Devel-DLMProf-0.05-alt1.noarch.rpm =head1 SYNOPSIS
perl-Devel-DProfLB-0.01-alt1.noarch.rpm perl module Devel-DProfLB
perl-Devel-DebugHooks-0.05-alt1.noarch.rpm Perl debugger
perl-Devel-DebugHooks-scripts-0.05-alt1.noarch.rpm Devel-DebugHooks scripts