But I've been writing lots of test code recently and found that I use blocks and labels, along with nested blocks with labels. Stuff that looks like:
USER: {Frustratingly, perltidy likes to tidy this into:
my $shared_db_thingy = create_db_thingy( %params );
SKIP: {
# create user tests
skip 'DB Thingy not created', $test_count
unless $shared_db_thingy;
lives_ok { $shared_db_thingy->create_user( %user_parameters ) } 'create_user';
}
SKIP: {
# retrieve user tests
}
}
USER: {I had to do some real digging into perltidy to find the -ola that outdents labels.
SKIP: {
}
SKIP: {
}
}
Setting the -nola fixes it. And doesn't having any (seen) side effects.
w00t!
No comments:
Post a Comment