in reply to Re: To <=80 char code line length or not
in thread To <=80 char code line length or not

> Perltidy has very good options to handle most of this

Unfortunately, the devil is in the detail. At work, we tried to run it over our codebase: where the formatting was previously complex and provoked discussions, the automated results were plain wrong, as the meaning of the code was lost.

($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,

Replies are listed 'Best First'.
Re^3: To <=80 char code line length or not
by LanX (Saint) on Jun 11, 2018 at 15:48 UTC
    Believable!

    I'd be interested to see an example, configuration of perltidy is indeed complex.

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery

      For example, with

      the following part of the code (note the tabs)

      Exception::throw( sprintf( 'Problem accessing resource on URI: "%s" by "%s" at "% +s, line %s".', $uri, caller() ) );

      was tidied to

      Exception::throw( sprintf( 'Problem accessing resource on URI: "%s" by "%s" at "%s, line %s".', $uri, caller() ) );

      Basically, long lines are broken in unexpected places, ternary operator is rendered unreadable, etc.

      ($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,