Shlomi Fish wrote:
> Maybe I'm missing something, but in your second example, you declare
> $override as a lexical and don't use it anywhere. May I inquire what
> was your real intention?

I'm pretty sure he was trying to do this:

add_user.t
$testing = 1;
add_user(); # prints TAP

do_something_that_needs_a_user.t:
$testing = 0;
add_user(); # doesn't print TAP, but adds the user
ok({do_some_stuff});

The idea being that writing the add_user mech stuff twice is messy.

Suppressing the TAP seems unclean on the surface, but lacking access to
the database (so you can do a proper add_user to the data source), it
seems like a good idea to me.  The code is written exactly once, and
since it's its own test, you know it works!  (Self-testing code)++

-- 
package JAPH;use Catalyst qw/-Debug/;($;=JAPH)->config(name => do {
$,.=reverse qw[Jonathan tsu rehton lre rekca Rockway][$_].[split //,
";$;"]->[$_].q; ;for 1..4;$,=~s;^.;;;$,});$;->setup;

Reply via email to