vroom wrote:
cd directory_of_PerlTidy perl perltidy -io -i=3 path_to_script_to _be_formatt +ed
I keep the above in a comment in the script it's used in. There should be a feature to automatically insert such a comment,
If there's some boiler-plate that you want to appear in all of your code, you need an emacs templating system, such as template.el:
http://emacs-template.sourceforge.net/
I've been working on an emacs lisp package to use template.el with perl, which I call "perlnow.el":
http://obsidianrook.com/perlnow
Even if you don't want to use my code, you might like to look at the template.el templates there that I set-up to use for perl code.

(Briefly: perlnow.el is designed to automate some routine tasks in perl programming: jumping into writing code, doing a "compile/check" on the code, jumping into writing tests for your code, running the tests, and so on. I've been finding it useful, but I'm still turning up minor bugs.)

with a time stamp of when it was tidied.
There I can't help you much off hand, you'll need to do some hackery of your own, either in perl or elisp.

What I would probably do is write some elisp similar to what rhythmicus posted: it wouldn't be too hard to write an emacs extension that would do a perltidy on the current buffer, and insert or update a standard comment with a timestamp for when perltidy was run.

20040810 Edit by ysth: move </i> out of <blockquote>


In reply to Re^4: Specific Indentation request for perl in Emacs by doom
in thread Specific Indentation request for perl in Emacs by Yoyoson

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.