Constant::RuntimeConstant::Runtime is a Perl module that generates constants at runtime. | |
Download |
Constant::Runtime Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- Anders Nor Berle
- Publisher web site:
- http://search.cpan.org/~berle/Constant-Runtime-0.0099_01/lib/Constant/Runtime.pm
Constant::Runtime Tags
Constant::Runtime Description
Constant::Runtime is a Perl module that generates constants at runtime. Constant::Runtime is a Perl module that generates constants at runtime.SYNOPSIS use Constant::Runtime; Constant::Runtime->make ("Foo",42); print Foo(); Constant::Runtime->make ("Foo::Bar",42); print Foo::Bar(); my $constant = Constant::Runtime->make_anon (42); print eval "$constant";This module was born as a tool to generate constants for optimizing runtime code evaluation for MooseX::Method. Feel free to use it for whatever you can imagine though.METHODSmake ($constant_name,$value) Constant::Runtime->make ("Foo",42);This will make a constant in the calling class by the name "Foo". Constant::Runtime->make ("Someclass::Constant",42)This will make a constant in the specified class by the name "Foo".make_anon ($value) my $anonymous_constant = Constant::Runtime->make_anon (42);Used for generating an anonymous constant. Technically, the constant will have a name, you just won't care about what it is, only that you can use it. Requirements: · Perl
Constant::Runtime Related Software