Subject: | Allow for test method names that would otherwise collide with core method names |
I like to write my test classes in parallel with the actual classes I'm
testing. This usually includes method names, which makes it easy for me
to see what I'm testing. The only problem I've run into, is that if one
of my methods is the same as the name of a core method of Test::Class, I
have a problem because my test overrides the Test::Class functionality.
The most obvious example of this occurs in writing a test for my new
method. If I declare:
sub new : Test( 5 ){
# blah blah blah
}
my test ain't gonna work. This isn't really a big deal, and I know now
to name my new tests test_new, but it hung me up for a while and I'm
sure I'm not the only one. I know this would likely require some Perl
Black Magic and can't be prioritized that high, but it sure would be nice.
Actually, I'd be happy to talk with you about implementation strategies
and try to write the patch myself. I have a couple of ideas, but nothing
concrete.
Let me know what you think.