This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Allow package name in ‘use constant’ constants
authorFather Chrysostomos <sprout@cpan.org>
Tue, 26 Aug 2014 04:41:55 +0000 (21:41 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Tue, 26 Aug 2014 05:17:03 +0000 (22:17 -0700)
commit8b57a5fa267949bb7bbe46ef30cee23c88855487
tree1bca4aa46ab4048141e0bde170bf9656a0cecedf
parent91fe6db2b17915d15784e17391098d40d8c142d3
Allow package name in ‘use constant’ constants

See the thread that includes
<20140821044934.29399.qmail@lists-nntp.develooper.com>.

This provides a way for a package to define constants in another pack-
age, without having to resort to *other::const = sub () { $value }.
Now one can write constant->import("other::const" => $value).

Documentation will be added in an upcoming commit.
dist/constant/lib/constant.pm
dist/constant/t/constant.t