in reply to Re^4: OOP - Constant Vs. Subroutine
in thread OOP - Constant Vs. Subroutine
but bbb->PUNCTUATION 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 |