jeudi 1 janvier 2015

Perl debugger on test modules

I'm running into problems testing a new addition to a module. (Specifically - the ~ operator seems to be not working in Math::Complex for this new feature only.) It's too bizarre to be what it appears but the ideal scheme would be to add the -d option on the top line of the .t program.


Well, I was quickly disabused of that idea! It does not invoke the debugger.


If I wanted to use the debugger, I'd need to create an edit of the .t program that:



  • Uses (the use command) the module directly. not in the form of BEGIN { use_ok('My::Module') };

  • Does not "use Test::More;"

  • A few other edits that cause gluteal pains


The problem with doing that is that any changes I make in the edited test program I still need to transfer back to the true test program use in "make test". Error prone as best.


I am already using "make test TEST_VERBOSE=1" so that my stdio output shows up. But there's GOT to be a simpler way to invoke the debugger on the .t


Thanks for ideas here.


-- JS


Aucun commentaire:

Enregistrer un commentaire