Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 976 Categories, Downloaded 30.068.078 Times

Devel::Constants 1.00

  Date Added: November 24, 2010  |  Visits: 471

Devel::Constants

Report Broken Link
Printer Friendly Version


Product Homepage
Download (73 downloads)

Devel::Constants is a Perl module that translates constants back to named symbols. SYNOPSIS # must precede use constant use Devel::Constants flag_to_names; use constant A => 1; use constant B => 2; use constant C => 4; my $flag = A | B; print "Flag is: ", join( and , flag_to_names($flag) ), "n"; 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 constant 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 NetPacket::TCP 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";.

Requirements: No special requirements
Platforms: Linux
Keyword: Constant Constants Develconstants Flag Libraries Module Netpacket Package Perl Perl Module Programming Tcp
Users rating: 0/10

License: Freeware Size: 6.14 KB
DEVEL::CONSTANTS RELATED
Libraries  -  App::Modular::Module::Events 0.1.2
App::Modular::Module::Events is a Perl module with event handling for App::Modular compatible applications. SYNOPSIS #################################################################### package App::Modular::Module::Me; use base...
16.38 KB  
Libraries  -  perlrpcgen 0.71
perlrpcgen is a Perl module that can generate Perl interfaces from ONC RPC interface definitions. SYNOPSIS perlrpcgen [--makefile] [--all] [--client] [--server] [--data] [--constants] [--module module] [--typemap typemap] [--fork] [--perl...
37.89 KB  
Utilities  -  Pam_p11 0.1.3
Pam_p11 is a plugable authentication module (pam) package for using crpytographic tokes such as smart cards and usb crypto tokens for authentication. Pam_p11 uses libp11 to access any PKCS#11 module. The project should be compatible with any...
307.2 KB  
Libraries  -  Module::Crypt 0.04
Module::Crypt is a Perl module to encrypt your Perl code and compile it into XS. SYNOPSIS use Module::Crypt; # for a single file: CryptModule( file => Bar.pm, install_base => /path/to/my/lib ); # for multiple files: CryptModule(...
7.17 KB  
Libraries  -  Class::Generate 1.09
Class::Generate is a Perl module that can generate Perl class hierarchies. SYNOPSIS use Class::Generate qw(class subclass delete_class); # Declare class Class_Name, with the following types of members: class Class_Name => [ s => $, #...
53.25 KB  
Libraries  -  Apache::Wyrd 0.94
Apache::Wyrd is a Perl module for HTML embeddable perl objects under mod_perl. Apache::Wyrd is the core module in a collection of interoperating modules that allow the rapid object-oriented development of web sites in Apaches mod_perl...
174.08 KB  
Libraries  -  HOP::Lexer 0.031
HOP::Lexer is a Perl module for "Higher Order Perl" Lexer. SYNOPSIS use HOP::Lexer string_lexer; my @input_tokens = ( [ VAR, qr/[[:alpha:]]+/ ], [ NUM, qr/d+/ ], [ OP, qr/[+=]/ ], [ SPACE, qr/s*/, sub { () } ], ); my $text = x = 3 +...
12.29 KB  
Libraries  -  PLJava 0.04
PLJava is Perl module that will embed Perl into Java. USAGE import perl5.Perl ; import perl5.SV ; public class test { public static void main(String argv[]) { Perl.eval("print qq`Hello World!n` ;") ; /////////////////// SV foo =...
163.84 KB  
Network & Internet  -  Jeta SSH Module 1.0
Jeta SSH Module provides a Horde SSH module. Jeta is the Horde Application Frameworks wrapper module for the SSHTools Java SSH Applet. Jeta is based on a java SSH client. It allows shell access to your web server, or to another machine if used...
3.1 MB  
Libraries  -  Inline::CPP 0.25
Inline::CPP is a Perl module that can write Perl subroutines and classes in C++. SYNOPSIS use Inline CPP; print "9 + 16 = ", add(9, 16), "n"; print "9 - 16 = ", subtract(9, 16), "n"; __END__ __CPP__ int add(int x, int y) { return x +...
24.58 KB  
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
Programming  -  FLEX-db Digital Asset Manager 3.0.9
FLEX-db - an enterprise Digital Asset Manager (DAM). It ingests and links metadata with files, creates thumbnails, and processes files using business rules. FLEX-db has a JSP client, Java app server for file input and output and an EJB metadata...
21.57 MB  
Programming  -  Libicom 0.9.0
The libicom library is a character based dynamicly linked library for Linux. It is used to remotely control the Icom IC-R8500 wide band receiver via an RS232 link. All call and return parameters to the control functions are character string based....
20.48 KB  
Programming  -  dotdesktop 0.3
Dotdesktop library provides ability to parse desktop entry file and access the information in a convenient way. Desktop entry file format is defined by freedesktop.org, it is used to describe information about an application such as the name and...
327.68 KB  
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  libyasl 0.2
Libyasl is a C++ class library to easily realize TCP/UDP/Multicast clientsand servers in IPv4 and IPv6 environments under GNU/Linux systems.
143.36 KB  
Libraries  -  wolfSSL 3.12.0
The wolfSSL embedded SSL/TLS library is a lightweight SSL library written in ANSI standard C and targeted for embedded and RTOS environments - primarily because of its small size, speed, and feature set. It is commonly used in standard operating...
2.73 MB  
Libraries  -  EuGTK 4.8.9
Makes it easy to develop good- looking, fast, cross-platform programs that run on Linux, OS X, and Windows. Euphoria is a very fast interpreted/compiled language with straight-forward syntax. EuGTK allows programming in a clean, object-oriented...
10.68 MB  
Libraries  -  Linux User Group Library Manager 1.0
The LUG Library Manager is a project to help Linux User Groups start their own library. A LUG library is helpful to the community at large because it increases access to information, and gives everyone the opportunity to become more knowledgeable.
5.35 KB  
Libraries  -  Module::MakefilePL::Parse 0.12
Module::MakefilePL::Parse is a Perl module to parse required modules from Makefile.PL. SYNOPSIS use Module::MakefilePL::Parse; open $fh, Makefile.PL; $parser = Module::MakefilePL::Parse->new( join("", ) ); $info = $parser->required;...
8.19 KB  
Libraries  -  sqlpp 0.06
sqlpp Perl package is a SQL preprocessor. sqlpp is a conventional cpp-alike preprocessor taught to understand SQL ( PgSQL, in particular) syntax specificities. In addition to the standard #define/#ifdef/#else/#endif cohort, provides also...
10.24 KB