in reply to Combining Import and Source-Filter to implement Syntactic Macro mechanism

Maybe a look at https://metacpan.org/source/RURBAN/Filter-1.59/Call/Call.xs can be helpful? If one gets passed all those cryptic macros. One can start by clarifying where that points:

out_ptr = SvPVX(my_sv) + BUF_OFFSET(my_sv) ;

and also: ninstr(out_ptr, out_ptr + n, nl, nl + 1)) which is looking for a needle = nl = "\n0" in the big haystack=out_ptr according to perlapi

Replies are listed 'Best First'.
Re^2: Combining Import and Source-Filter to implement Syntactic Macro mechanism
by LanX (Saint) on Feb 20, 2019 at 15:32 UTC
    Unfortunately reading the source code is more of a guessing game for me.

    But I'm pretty sure that's just the way it is, the registered filter will only kick in for the next line. (Which could lead to weird bugs, if the same line statement spans multiple lines)

    I was hoping to discuss it with Reini at the German Perl Workshop, but he's still missing among the attendants yet.

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery FootballPerl is like chess, only without the dice