in reply to Re: Test::Code
in thread Test::Code
I agree that the name is bad. I do plan to change it. As for why I might not want to execute the code, think about "HOP." If you were to try and write tests for the parser, you might find it quite a bit easier to write eq_code $code, $expected; than to constantly create correct subs to pass into code and make them work.
A problem can also arise when the code being generated does things that you'd rather not execute. Maybe it starts pulling a value off an iterator but you don't want that to happen yet. Maybe it deletes files, closes a filehandle or does other cleanup work that shouldn't happen yet.
Cheers,
Ovid
New address of my CGI Course.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Test::Code
by adrianh (Chancellor) on Aug 13, 2005 at 08:34 UTC |