Constants are inherited, actually - but you have to use method calls:
use strict; package Const; use constant LOGIN => 'user'; package Pac; use vars '@ISA'; push @ISA, 'Const'; package Main; print Pac->LOGIN, "\n"; # user
In reply to Re: inheritance of constants
by fglock
in thread inheritance of constants
by mat21
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |