ex::constant::varsex::constant::vars is a Perl pragma to create readonly variables. | |
Download |
ex::constant::vars Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- Casey R. Tweten
- Publisher web site:
- http://search.cpan.org/~ctweten/ex-constant-vars-0.01/vars.pm
ex::constant::vars Tags
ex::constant::vars Description
ex::constant::vars is a Perl pragma to create readonly variables. ex::constant::vars is a Perl pragma to create readonly variables.SYNOPSISUsing the tie() interface: use ex::constant::vars; tie my $pi, 'ex::constant::vars', 4 * atan2( 1, 1 ); tie my @family, 'ex::constant::vars', qw( John Jane ); tie my %age, 'ex::constant::vars', John => 27, Jane => 'Back off!';Using the const() function: use ex::constant::vars 'const'; const SCALAR my $pi, 4 * atan2( 1, 1 ); const ARRAY my @family, qw( John Jane ); const HASH my %age, John => 27, Jane => 'Back off!';Using import() for compile time creation: use ex::constant::vars ( '$pi' => 4 * atan2( 1, 1 ), '@family' => , '%age' => { John => 27, Jane => 'Back off!' }, ); Requirements: · Perl
ex::constant::vars Related Software