in reply to Reading sourcecode at parsing/compilation (CHECK) time?

very strange ...

replacing the while(<DATA>)... code in the attribute handler with

my $pos=tell DATA; seek DATA,0,0; my @src=<DATA>; print "> $src[$linenum-1]\n"; seek DATA,$pos,0;

works fine!

while(<DATA>) seems to have a special magic causing trouble...

BUT if the __DATA__ literal is missing at the end of the code, there doesn't seem to be any open file handle for the source code...

Seems like explicitely opening and closing the file path seems the only way to go...

Cheers Rolf