Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

Re^2: perltidy 20101217 not detecting errors

by Dandello (Scribe)
on Feb 07, 2011 at 21:21 UTC ( #886796=note: print w/replies, xml ) Need Help??

in reply to Re: perltidy 20101217 not detecting errors
in thread perltidy 20101217 not detecting errors

Just for you, Anonymous


#!/usr/bin/perl use strict; use warnings; my $format = 0; if ( $format == 1 ) { print $format; } else { print 'Oops'; exit;
- including an obvious and intentional error.

Run through Perltidy from run/cmd: perltidy -g C:\testing\

The -g is the flag for a full log including warnings

What I expect: an ERR file from Perltidy telling me I have a missing right curly bracket at or before line 13 and the previous unmatched bracket is at line 10. This file should be in the same directory as the script being checked.

No ERR file and the log is this:

perltidy version 20101217 log file on a MSWin32 system, OLD_PERL_VERSI +ON=5.012002 Windows type is XP/.Net Configuration and command line parameters for this run: -g To find error messages search for 'WARNING' with your editor

The previous version of Perltidy gave me the ERR file on exactly this type of problem. Now there isn't one. But it still does a nice job prettying up my code.

Replies are listed 'Best First'.
Re^3: perltidy 20101217 not detecting errors
by Anonymous Monk on Feb 07, 2011 at 22:01 UTC
    Aha, now I see. Consulting I see
    - added new flag -it=n or --iterations=n This flag causes perltidy to do n complete iterations. For most purposes the default of n=1 should be satisfactory. H +owever n=2
    a quick test with -it=2 generates a .ERR file like the previous version used to

    You're welcome :)

      Thank You

      Okay - with that flag it does work the way I was expecting/wanted.

      I'm not sure this is a positive change on their part.

      And now there is something searchable for people in the same boat as I was.

        I'm not sure this is a positive change on their part.

        I'm not either, even if there are good reasons for the feature, changing defaults is icky icky icky :)

        Actually, the more I think about it, the more I consider this a bug.

        Actually I'm sure its a bug.

        • It is not documented properly (not in Perl::Tidy).
        • there are no tests for it.
        • I just checked, and this has been the behaviour of Perl-Tidy since 05-Nov-2002. Changing the defaults after 8+ years is just dumb. jswartz was smart enough to add this feature, he should have been smart enough to change his perltidy config file :) and not mess with the defaults

        You should definitely report this :)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://886796]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2018-05-26 20:39 GMT
Find Nodes?
    Voting Booth?