in reply to Filepointer of source file inside source filter

One yucky way to do this, would be to read the original source file for the N lines until where the use load is located (because I can know the line number from the call stak, but I would need the byte offest).

If you're willing to go that far could you do something like (untested):

package MyFilter; use Filter::Simple; FILTER { while (m/sub \s+ (\w+) \s+ : \s+ method/xg) { my ($name, $offset) = ($1, pos); $offset += $BYTE_OFFSET_FROM_WHERE_FILTER_WAS_INVOKED; warn "ondemand subroutine $name at byte offset $offset\n" }; };

.. or am I missing something obvious (probably - since I think source filters are evil and avoid them like the plague ;-)