What, just like that? I'm not sure how that would work since you'd have to have built in the ->dump method calls beforehand. Or do you include things like $obj->dump if $obj->can( 'dump' ) so it works in both cases?
| [reply] [d/l] |
$obj->dump if $obj->can( 'dump' )
Actually, I wouldn't do that, since you want the debug code removed from your source when running in production. So, by not loading "dump.pm" while in production, your program would bomb because the "dump" method no longer exists, forcing you to either remove or disable the line.
Now, if we would have real assertions, this would be different.
Liz
| [reply] |