On Tue, Nov 15, 2005 at 10:26:05AM -0800, jerry gay wrote:
> > Thus, while PGE::Match currently defines a C<__get_pmc_keyed_int>
> > method, it's doesn't yet define a C<__get_string_keyed_int> method.
> > So, a statement like
> >
> >    .local string res
> >    .local pmc match
> >    res = match[0]
> >
> > is defaulting to using the inherited op from the Hash class, and
> > since there's not an entry at the 0 key in the hash (as opposed to
> > the array) you get the null PMC.
> >
> it seems to me it could inherit from Array as well, but it may not be
> a precise fit.

Worse, I think the two might interact in strange and undesirous
ways.  

> > I guess I should go ahead and provide methods in the match objects
> > for the other *_keyed_int operations, if only to avoid this sort of
> > confusion and the need to store things to an intermediate pmc.
> >
> this is probably the better way to go, and seems easy enough to
> implement (and test.) :)
> i'll take a stab at it, if you don't mind.

Sure, that'd be great!

> if my read of S05 is correct, i believe $<1> (and $1) equates to
> $/[0]. of course, you may have a newer copy than i do. ;)

I have a newer copy.  $<0>, $0, and $/[0] are now all the same.

Pm

Reply via email to