On 10/5/05, Joe McMahon <[EMAIL PROTECTED]> wrote: > From Schwern's comment: > > I'll consider putting in some more information into the > Test::Builder->details so information like the file and line number > where the test occured can be gotten without scraping. > > I'd really like to have this as well. Current projects could really use > it.
For me the "correct" way to check line number and file is to not check them at all, they're a moving target and lead to things like the line_num() function. A more useful thing to check is the perceived stack depth - that is (actual stack depth) - $Test::Builder::Level because this is what determines whether line num and file will be correct or not. Better still it should be the same for every test. Of course if you're just trying to output the line num and file then it's not useful, F