It occured to me 10 seconds ago, that there wasn't any simple
way to include hyperlinks inside of <code> blocks.
In particular I was trying to make a line that said "use LWP::Simple;" look like: "use LWP::Simple", but instead i got: "use [cpan://LWP::Simpl]"
Then it occured to me, that it would seriously ROCK! if code blocks automaticly hyperlinked all "use" lines to the corrisponding "cpan://" url, or if built in functions got hyperlinked to their "perldoc -f" descriptions ... maybe even operators could be linked to their descriptions from perlop.
Obviously, some code could get hard to read and cluttered if this happened automaticly ... but what if it was implimented as optional attributes for the <code> tag -- soo you could specify what exactly you wanted hyperlinked (to feature the particular pieces of code you think the reader should read up on)? Something like these maybe...
- <code cpan="" perlop="" perlfunc="">
(hyperlink all module names to cpan and all uses of all operators and functions to their perldoc pages)
- <code cpan="CGI" perlop="">
(hyperlink just the CGI module (even if other modules are used) to cpan, and all uses of all operators (but no functions) to their perldoc pages)
- <code use="CGI Mail::Send" perlop="=~">
(hyperlink two module names to cpan: CGI and Mail::Send (even if other modules are used), and all uses of =~ (but no functions) to their perldoc pages)
- <code urls="=~ http://a.com $$foo perldoc://perlref">
(hyperlink all uses of =~ to the specific url http:://a.com, and all occurences of the string "$$foo" to the "url" for the perlref perldoc page -- as if it were in square brakets)
Not sure how feasible this all is ... i'm kind of reaching with that "urls" attribute idea, but i thought i'd throw it out there.
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.