Do you know where your variables are? | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Ah, I'm glad someone's really putting it to the test. :) And yes, it does do better than VIM. :-p (You should see VIM choke on the relatively simple: qr ( one ( two ) three )x;!) Regular Expressions are one of the weak points of the module. It's even listed under KNOWN ISSUES or LIMITATIONS (or at the mirror) in the documentation. I may add support for regexp-special characters later, and maybe even set it up to handle the /e option. The big problem with the /e option is that it requires back-tracking (see my recent reply). I tried to show off, in the Test file, some of the tricky constructs that the formatter handled correctly. Especially that funky here-doc stuff at the bottom. :) Note that VIM doesn't even handle formats at all. All in all, I've tried to make it as true to Perl as I could (without actually parsing the code!). Considering I just shatter the string with a heavy regexp (or 10) and then walk through the pieces, I'm surpised I got it working this well! :D Thanks for the tip on a2ps! I originally started writing this module because I didn't know of anything that would highlight Perl code for presentation-or-printing. I wanted to be able to really show off my code on the web so I started working. I looked through the home page for a2ps and it looks nice. Very versatile as far as languages it handles, though I think that limiting it to PostScript output makes it not as good for my orignal purpose (of converting code to HTML). Do you know of a PS to HTML filter? I certainly never plan to extend my formatter to handle languages other than Perl (people use languages other than Perl???) so I think a2ps will always beat me out in that respect. :) I didn't install it to try it out so I don't know how well it handles some of the more esoteric constructs of Perl. It certianly looks powerful enough to do a good job! Well, thanks again for your reply, and let me know if you get a chance to delve into the depths of the module and can offer any suggestions for improvement! bbfu In reply to (bbfu) (tested code) Re: Re: Seeker of Perl Code Review
by bbfu
|
|