CPAN source syntax highlighting

I've just updated a syntax highlighter bookmarklet I wrote a while back so that it now supports Chrome and Safari, besides Firefox.

I find it useful to syntax highlight when I peek at a module's source code in the CPAN website. You may find it useful too.

To install it, create a new bookmark and paste the following code into the location field (sorry, I couldn't find a way to post this as a javascript: link in this blog):

It will be even handier if you stick it in your bookmark toolbar.

Then view any module's source in CPAN, fire off this bookmarklet and voilà.

I've even thrown in some regex to allow linking from one module to the next. It works 90% of the time, moreless.

The code is actually kept here. There you'll also find a lushier, Alex Gorbatchev's syntax highlighter version available, but I couldn't get it to work in Chrome nor Safari, only in Firefox.

It should be easy to tailor these bookmarklets to fancy your taste buds.

1 Comment

Nice, it works great. For some reason, sticking a javascript: URL in a bookmark never occurred to me.

Leave a comment

About rodrigolive

user-pic Perl and all things considered