SPUG: Programming diagramming software

Ivan Heffner iheffner at gmail.com
Fri Jul 25 13:37:38 PDT 2008


On the subject of perltidy breaking code, I was fortunate enough to 1)
go to OSCON for the tutorials and 2) go to Damian's "Perl Worst
Practices" session. He walk through SelfGOL
<http://www.perlfoundation.org/perl5/index.cgi?selfgol> which was his
entry in the 3rd Obfuscated Perl Contest. It breaks when you run
perltidy on it, but that has to do with assumptions that perltidy
makes and the horrific style that Damian used. Specifically, he
typeglobbed a subroutine named ';
'. That's "semicolon-newline". As in ";\n"->(). Pertidy assumed the
literal newline in single-quoted string was insignificant and thus
removed it. This is an extreme example but it is an example none the
less.

Ivan

On Wed, Jul 23, 2008 at 9:40 PM, Jacinta Richardson
<jarich at perltraining.com.au> wrote:
> Michael R. Wolf wrote:
>
>> Unfortunately, I think it broke some of the code.  It's been years, so I
>> don't remember the particulars, and I could even be mistaken there.
>>
>> Anyone heard of perltidy(1) *changing* code instead of just *formatting* it?
>
> Perltidy didn't make code *changes*, but it was known - in now very old versions
> - to occasionally break code it didn't parse correctly.  Test cases for such
> situations were few and far between; but I understand that the perltidy
> developers and testers are a) confident such issues don't arise anymore and b)
> very eager to find out if they're wrong about that.  ;)
>
> All the very best,
>
>        Jacinta
>
> --
>   ("`-''-/").___..--''"`-._          |  Jacinta Richardson         |
>    `6_ 6  )   `-.  (     ).`-.__.`)  |  Perl Training Australia    |
>    (_Y_.)'  ._   )  `._ `. ``-..-'   |      +61 3 9354 6001        |
>  _..`--'_..-_/  /--'_.' ,'           | contact at perltraining.com.au |
>  (il),-''  (li),'  ((!.-'             |   www.perltraining.com.au   |
> _____________________________________________________________
> Seattle Perl Users Group Mailing List
>     POST TO: spug-list at pm.org
> SUBSCRIPTION: http://mail.pm.org/mailman/listinfo/spug-list
>    MEETINGS: 3rd Tuesdays
>    WEB PAGE: http://seattleperl.org/
>


More information about the spug-list mailing list