in reply to perltidy in PM posts

PerlMonks strives to minimize the impact of "editing" of original posts. Site Janitors do their best to walk lightly. Whether it be by human touch or automation, changing the code's layout ala perltidy would break away from the spirit of that philosophy. Speaking for myself as a janitor, I have evolved to prefer simply wrapping naked code in code tags without altering the code's actual layout, as much as possible (or more accurately, as little as possible). I wouldn't want to automate something more heavy handed than that.

As for syntax highlighting, I know that though there are many proponents, there are some who feel that it encourages sloppy code layout.


Replies are listed 'Best First'.
Re^2: perltidy in PM posts
by Tux (Canon) on Nov 23, 2011 at 07:32 UTC

    There are two sides of the coin too. Running perltidy at the user end would be fine with me. He or she selects that feature. Running it at the server end would definitely chase me away, as it will change my style with some other style and thus remove my artistic freedom - I actually care a lot about style and layout, and the fact that it is changed by others made me decide to never ever write for books that change code style to their standard, as it then no longer is my code.

    A second reason not to allow whatever form of code-reformatter is that many of the posts are just about this: why is may layout like XXX, and what should I change to get layout YYY. If that was formatted, you'd see no difference. Example.

    Enjoy, Have FUN! H.Merijn
      And don't forget that not everything between <code> tags is perl code!

        For that reason, if this were to be done, perhaps there should be a special tag like <tidy> for it. I'm not commenting on how difficult that would be to implement, because I have no idea; but it would solve the issue of not wanting it applied to all things that are placed in <code> tags.

        Aaron B.
        My Woefully Neglected Blog, where I occasionally mention Perl.

      Tux nice 1.
      totally agree with you
Re^2: perltidy in PM posts
by LanX (Sage) on Sep 17, 2017 at 23:19 UTC
    I think the answer to different needs is easy: provide different options.

    We already have different displaytypes and could add a tidy one, which could be chosen in individual user settings.

    As for syntax highlighting people are free to choose monochrome CSS classes.

    Backwards compatibility is no problem here.

    Cheers Rolf
    (addicted to the Perl Programming Language and ☆☆☆☆ :)
    Je suis Charlie!