develooper Front page | perl.perl5.porters | Postings from June 2008

Re: How to dig through symbol tables

Thread Previous | Thread Next
Nicholas Clark
June 20, 2008 02:02
Re: How to dig through symbol tables
Message ID:
On Thu, Jun 19, 2008 at 07:55:00PM -0700, Yitzchak Scott-Thoennes wrote:
> On Thu, June 19, 2008 6:10 pm, Ben Morrow wrote:
> > Quoth
> >> Indeed, if any other slot is defined, *{FOO}{SCALAR} seems to be
> >> defined.  Is this intended behavior?
> >
> > Yes. If a glob exists at all it has a SCALAR slot.
> But see

But IIRC the Perl visible behaviour is preserved. (It just seemed safer that
way) - if you use "THINGY" syntax (ie *{FOO}{SCALAR}) then *FOO's scalar will
become allocated. It's only if you're writing XS code to traverse a typeglob
that you'll be able to tell the difference.

Nicholas Clark

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About