RECENT POSTS

P5-devel-constants

May 26, 2018

Perl module to translate constants back to their named symbols

Declaring constants is very convenient for writing programs, but as they’re often inlined by Perl, retrieving their symbolic names can be tricky. This is made worse with low level modules that use constants for bit-twiddling.

DevelConstants makes this much more manageable.

It silently wraps around the constant module, intercepting all constant declarations. It builds a hash, associating the values to their names. The names can then be retrieved as necessary.

WWW http//search.cpan.org/dist/Devel-Constants/