[Melbourne-pm] Tidyview now available from CPAN

Damian Conway damian at conway.org
Mon Oct 16 18:01:34 PDT 2006


Leif wrote:

> Note - some people feel that perltidy isn't safe to run over their
> code, for fear it will change the semantics (meaning) of their code.
> As far as I am aware, there are no bug reports against perltidy
> stating that this has happened. I've heard TheDamian once wrote a
> program for a perl obfuscation competition that wasn't tidy'able
> (selfGOL). This code seems to be hard to track down so I haven't had a
> chance to confirm this.

Yes, SelfGOL breaks when tidied, but only because it uses a subroutine
named ";\n" (literal semicolon, literal newline). Not, I suspect,
something perltidy should really be expected to cope with. ;-)

There *are*, however, a few places where whitespace is significant in
"normal" Perl code too. We had the example on this list just last
week:

    print $x + $y;

vs:

   print $x +$y;

Damian


More information about the Melbourne-pm mailing list