All,

I have a simple problem, and hopefully hteres a simple solution, or perhaps
I'm just barking mad.

package myclass::A;

use constant CONSTANT_ITEM=>'1';

package myclass::B;

#no constant defined



Outside of these two classes, I was wondering if it possible to do a check
which tells me if a constant has been defined,

if I do this:-

my $item_a=$class_a->CONSTANT_ITEM;
my $item_b=$class_b->CONSTANT_ITEM;

I get an error message saying CONSTANT_ITEM isn't defined.
I tried this:-
if (defined($class_a::CONSTANT_ITEM))

But that always returns undef.

Can anybody help?

Regards

Marty

_______________________________________________
Perl-Unix-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to