Const::Common - Yet another constant definition module
package MyApp::Const; use Const::Common ( BAR => 'BAZ', HASH => { HOGE => 'hoge', }, ); __END__ use MyApp::Const; print BAR; # BAZ print HASH->{HOGE}; # hoge; HASH->{HOGE} = 10; # ERROR!
Const::Common is a module to define common constants in your project.
$hashref = $class->constants
$array = $class->constant_names
$value = $class->const($const_name)
Copyright (C) Songmu.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Songmu <y.songmu@gmail.com>
To install Const::Common, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Const::Common
CPAN shell
perl -MCPAN -e shell install Const::Common
For more information on module installation, please visit the detailed CPAN module installation guide.