It is said in the Holy Books that the only program that can correctly parse Perl is Perl itself. I have taken this teaching to heart and have written a twisted little Perl tags generator (like ctags) that does not attempt to parse the Perl text itself. I have put it in Craft
here. Instead, it runs as a Perl debugger, which gives it access to the tables of symbols and line numbers that debuggers have access to. And it works quite well.
Except for one thing: anything in a BEGIN (or probably also INIT) block gets run. If these blocks print to STDOUT they mess up the tags file.
Now I guess I could just use another file handle to write to and hope that the BEGIN blocks don't have nasty side effects, but does anyone know how I can gain control before the BEGIN blocks run? (I've tried adding the line
BEGIN { $DB::single=1 }to the end of the PERL5DB env var but it didn't help)
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.