in reply to Automate perltidy for PM code?

should perltidy be automated here for these purposes, and if so, should it be automatically for every code-tagged block or something requested by moderators and performed by janitors?

No, no, no. Posters should be able to post code to look the way they want it to look, full stop.

Or the status quo is "advise but not enforce perltidy".

Personally, I don't believe PerlMonks should officially advise perltidy. Fine for individuals to do, but PerlMonks should be neutral on the issue.

(I point out, though it should be rather obvious, that in many cases the way code is formatted when posted must be preserved, as in the obfu section.

A word spoken in Mind will reach its own level, in the objective world, by its own weight

Replies are listed 'Best First'.
Re^2: Automate perltidy for PM code?
by derby (Abbot) on Jul 09, 2007 at 14:41 UTC

    While I would agree with on not automagically using perltidy, why should PM remain neutral about advising it? While layout style discussions waste a lot of time, I think we could all agree that following any standard is best practices and if you're having trouble deciding what that standard should be than maybe the default settings of perltidy could fill the gap.

    -derby

      For one thing, because the quality of the code (and thus the stage of the querent's Perl journey) is often reflected in less tangible elements like the use of white space and identifiers. A lot of information could be lost by running everything through PerlTidy - including the entire point of some questions, especially those involving style considerations.


      DWIM is Perl's answer to Gödel
        Yes and I think we're all unanimous now that it can't be forced on every node.
        __________________________________________________________________________________

        ^M Free your mind!

      And PerlMonks should recommend Parse::RecDescent for all your parsing sorro^Wneeds, too.

      A word spoken in Mind will reach its own level, in the objective world, by its own weight

        Now you're just being silly.

        -derby
Re^2: Automate perltidy for PM code?
by Moron (Curate) on Jul 09, 2007 at 15:17 UTC
    Yes I can see ur right - it can't be automated for every code tag for poetic/artistic reasons - I'll scratch that idea - but I also tried to offer that there are other options available of varying flexibility and as to who-can hypothetically use it. For example, the option of a perltidy tag wouldn't enforce any policy.
    __________________________________________________________________________________

    ^M Free your mind!