Patrick R.Michaud (via RT) wrote:

I've run into the following problem using concat with
Match objects from PGE.  The code below performs a match,
then attempts to concatenate a string with the results
of the returned Match object:

There are several problems with the internals of objects derived from PMCs. The code tries to create a new destinaation according to the src operands (this is where the failing clone is called). If I turn that part off, it still wouldn't work, as it calls get_string on the contained Hash and not on the PGE::Match directly.

A workaround is to implement .sub __concatenate :multi(String, PGE::Match) and use the n_concat opcode (which creates a new destination result).

I'm also entering a todo test for the above into t/compilers/pge/02-match.t.

I've adjusted this test, to use this workaround.

Thanks,

Pm

leo

Reply via email to