Rafael Garcia-Suarez wrote:
> Dave Mitchell wrote:
> > On Tue, Oct 04, 2005 at 10:14:21AM +0200, Rafael Garcia-Suarez wrote:
> > > Here's a shortest example of what has changed :
> > >
> > > $ perl5.8.7 -wle 'print defined %foo::'
> > >
> > > $ bleadperl -wle 'print defined %foo::'
> > > 1
> > >
> > > I don't really know why.
> > > Anyway, isn't the use of defined with hashes and arrays discouraged ?
> >
> > Yes, and for lexical hashes you get a compile-time warning:
> >
> > $ perl -wce 'my %foo; print defined %foo'
> > defined(%hash) is deprecated at -e line 1.
> > (Maybe you should just omit the defined()?)
> >
> > although interestingly in Perl_ck_defined where it emits those warnings,
> > it has:
> >
> > case OP_RV2HV:
> > /* This is needed for
> > if (defined %stash::)
> > to work. Do not break Tk.
> > */
> > break; /* Globals via GV can be undef */
> >
> >
> > Sounds like we've broken Tk.....
>
> Ooh, an undocumented and untested feature.
Nicholas, I think you're the one to blame here...
Change 24660 by [EMAIL PROTECTED] on 2005/06/01 14:33:14
Store the xhv_aux structure after the main array.
This reduces the size of HV bodies from 24 to 20 bytes on a 32 bit
build. It has the side effect of defined %symbol_table:: now always
being true. defined %hash is already deprecated.
Affected files ...
... //depot/perl/hv.c#220 edit
... //depot/perl/hv.h#70 edit
... //depot/perl/sv.c#855 edit
... //depot/perl/sv.h#192 edit
... //depot/perl/t/op/magic.t#75 edit