I had an idea that PMDevils might consider. My idea came when reading clipcommand.pl (Embed perl into your clipboard). In that post, antirice has 7 <code> blocks; one of them the "big one". I love the download tag (thanks to whomever coded that a long time ago), but each time I click one in this post, they're always defaulted to save as 648493.pl. It's no big deal to rename it, but my idea was that the author might be given the power to change the default save file name as an attribute to the code tag.

Thus, when antirice puts his little macros in code tags he could just enclose them in <code></code>; the default {nodeid}.pl would still hold. When he puts the big script in it might read <code savename="clipcommand.pl"></code>.

This might help out in other places where someone has put a sample data file in code tags (instead of after __DATA__) and then referred to a file name in their script enclosed in separate code tags. The file name could be in the savename attribute on the data file's opening code tag.

This is really just a brainstorm - I'm not complaining nor do I feel terribly inconvenienced as is. If PMDevils has plenty to do, then I'd rate this as a low priority snazzy feature instead of a "make the masses happy" feature.


I humbly seek wisdom.

In reply to Feature idea for code tags by goibhniu

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.