in reply to Re: Any way to inherit constants?
in thread Any way to inherit constants?

Whoops, I forgot what I actually have written. Foo::Constants should have looked like this:

# Foo/Constants.pm package Foo::Constants; use base "Exporter"; use constant PI => 3; our @EXPORT = (PI);
As such, I can use PI fron within any package that does "use Foo:Constants", but not from any of its subclasses. Thanks!

Replies are listed 'Best First'.
Re^3: Any way to inherit constants?
by thcsoft (Monk) on May 15, 2005 at 12:33 UTC
    agreed! this is the way the problem can be solved the perlish way.
    language is a virus from outer space.