Whoops, I forgot what I actually have written. Foo::Constants should have looked like this:
As such, I can use PI fron within any package that does "use Foo:Constants", but not from any of its subclasses. Thanks!# Foo/Constants.pm package Foo::Constants; use base "Exporter"; use constant PI => 3; our @EXPORT = (PI);
In reply to Re^2: Any way to inherit constants?
by Anonymous Monk
in thread Any way to inherit constants?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |