Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/songmu/p5-const-common


https://github.com/songmu/p5-const-common

Last synced: 2 days ago
JSON representation

Awesome Lists containing this project

README

        

# NAME

Const::Common - Yet another constant definition module

# SYNOPSIS

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!

# DESCRIPTION

Const::Common is a module to define common constants in your project.

# METHOD

## `$hashref = $class->constants`

## `$array = $class->constant_names`

## `$value = $class->const($const_name)`

# LICENSE

Copyright (C) Songmu.

This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.

# AUTHOR

Songmu