Re: context matters

2005-11-16 Thread jerry gay
On 11/15/05, Patrick R. Michaud <[EMAIL PROTECTED]> wrote: > On Tue, Nov 15, 2005 at 10:26:05AM -0800, jerry gay wrote: > > > 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

Re: context matters

2005-11-15 Thread Patrick R. Michaud
On Tue, Nov 15, 2005 at 12:28:30PM -0800, Larry Wall wrote: > On Tue, Nov 15, 2005 at 12:32:38PM -0600, Patrick R. Michaud wrote: > : 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

Re: context matters

2005-11-15 Thread Larry Wall
On Tue, Nov 15, 2005 at 12:32:38PM -0600, Patrick R. Michaud wrote: : 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 li

Re: context matters

2005-11-15 Thread Patrick R. Michaud
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

Re: context matters

2005-11-15 Thread jerry gay
On 11/14/05, Patrick R. Michaud <[EMAIL PROTECTED]> wrote: > On Mon, Nov 14, 2005 at 06:59:51PM -0800, jerry gay wrote: > > it seems that in keyed string access to the match object, the result > > is returned directly as a string. in keyed integer access to the match > > object, an intermediate pmc

Re: context matters

2005-11-15 Thread Patrick R. Michaud
On Mon, Nov 14, 2005 at 06:59:51PM -0800, jerry gay wrote: > while adding some shiny new pge tests for return context, i came > across this PIRism: > > ##... > rulesub = p6rule('$:=(.)') > match = rulesub('abc') > .local string res > res = match['A'] > print res > ##

context matters

2005-11-14 Thread jerry gay
while adding some shiny new pge tests for return context, i came across this PIRism: using keyed string access to the match object ##... rulesub = p6rule('$:=(.)') match = rulesub('abc') .local string res res = match['A'] print res ## prints: a using keyed