Major DB::Color update (Perl QA Hackathon)

After my previous announcement of DB::Color, I've not had much time to work on it. I eventually disabled it on my box because it was broken on many common cases. Thanks to the Paris Perl QA Hackathon, I've solved a few nasty bugs and now I'm happily using it to debug Perl.

There are some caveats.

Syntax highlighting is slow and is broken in a few edge cases. To get around the first issue, I have naïve caching of syntax highlighted files (change the files and the MD5 sum differs and you get a new cache). Any cached file not used in the last 30 days is deleted.

The broken syntax highlighting has resulted in several bug reports for Syntax::Highlight::Engine::Kate.

My favorite bit (cough) with how I replace lines of code with the syntax highlighted versions is this:

Read that last comment. That's the sort of subtle issues that keep tripping me up while I write this. The latest release is on Github and will shortly hit CPAN.

5 Comments

The dualvar isn't merely numeric or "truthy", it is the address of a COP opcode. At http://perl5.git.perl.org/perl.git/blob/HEAD:/mg.c#l2008 the numeric address is turned into a pointer and dereferenced to toggle a flag on a COP* dbstate opcode.

I'll try to move the source of Syntax::Highlight::Engine::Kate to github tomorrow to make it easier for you or anyone else to send patches.

Thanks for the detailed bug reports!

Leave a comment

About Ovid

user-pic Freelance Perl/Testing/Agile consultant and trainer. See http://www.allaroundtheworld.fr/ for our services. If you have a problem with Perl, we will solve it for you. And don't forget to buy my book! http://www.amazon.com/Beginning-Perl-Curtis-Poe/dp/1118013840/