in reply to Re^4: OOP - Constant Vs. Subroutine
in thread OOP - Constant Vs. Subroutine

but bbb->PUNCT­UATION doesn't exist

Did you try it?

package aaa; use constant HELLO=> 'world'; use constant PUNCTUATION=> '!'; package bbb; our @ISA= qw( aaa ); use constant HELLO=> 'universe'; package main; print "\n Hello ", aaa->HELLO(), aaa->PUNCTUATION(); print "\n Hello ", bbb->HELLO(), bbb->PUNCTUATION();

produces:

Hello world! Hello universe!

- tye        

Replies are listed 'Best First'.
Re^6: OOP - Constant Vs. Subroutine (super constant!)
by 2xlp (Sexton) on May 12, 2007 at 18:54 UTC
    I had a typo in my ISA when I tried it ( i used isa aaaa ), giving me an inheritance error. You are most certainly correct.