----- Original Message ----- 
From: "Sisyphus" <[EMAIL PROTECTED]>

> Below is a modified form of that
> script that hints at what I'm asking about. Afaik, the
Devel::Peek::Dump()s
> of both the Soldier object and the Civilian object don't reveal anything
> that DESTROY() could use to determine whether it's dealing with a Soldier
> object or a Civilian object.
>
[snip]

Seems to me that the script included with that post is a bad idea. Not only
can DESTROY() not know whether it's dealing with a Soldier structure or a
Civilian structure, but perl itself doesn't seem to know either. I found I
could call (from perl) Civilian methods on Soldier structures and vice-versa
..... no complaint, no error, just the wrong answer (or, rather, an
unexpected answer when an error was expected).

To me, that's an indication that I should not be trying to bless different
structures into the same package.

Cheers,
Rob

Reply via email to