Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11]) by www.NetBSD.org (Postfix) with ESMTP id DEC7963CD29 for ; Tue, 16 Aug 2011 23:04:21 +0000 (UTC) Received: by mail.netbsd.org (Postfix, from userid 605) id BE41414A3AD; Tue, 16 Aug 2011 23:04:21 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 5C38714A302 for ; Tue, 16 Aug 2011 23:04:18 +0000 (UTC) X-Virus-Scanned: amavisd-new at NetBSD.org Received: from mail.netbsd.org ([127.0.0.1]) by localhost (mail.NetBSD.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id 7HlHNJHDg1ZA for ; Tue, 16 Aug 2011 23:04:17 +0000 (UTC) Received: from cvs.netbsd.org (cvs.NetBSD.org [IPv6:2001:4f8:3:7:2e0:81ff:fe30:95bd]) by mail.netbsd.org (Postfix) with ESMTP id A7D0B14A2D3 for ; Tue, 16 Aug 2011 23:04:17 +0000 (UTC) Received: by cvs.netbsd.org (Postfix, from userid 500) id 96F1B175DD; Tue, 16 Aug 2011 23:04:17 +0000 (UTC) MIME-Version: 1.0 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Date: Tue, 16 Aug 2011 23:04:17 +0000 From: "Thomas Klausner" Subject: CVS commit: pkgsrc/devel/p5-Perl-Tidy To: pkgsrc-changes@NetBSD.org Reply-To: wiz@netbsd.org X-Mailer: log_accum Message-Id: <20110816230417.96F1B175DD@cvs.netbsd.org> Sender: pkgsrc-changes-owner@NetBSD.org List-Id: pkgsrc-changes.NetBSD.org Precedence: bulk Module Name: pkgsrc Committed By: wiz Date: Tue Aug 16 23:04:17 UTC 2011 Modified Files: pkgsrc/devel/p5-Perl-Tidy: Makefile distinfo Log Message: Update to 20101217: 2010 12 17 - 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. However n=2 can be useful when a major style change is being made, or when code is being beautified on check-in to a source code control system. The run time will be approximately proportional to n, and it should seldom be necessary to use a value greater than n=2. Thanks to Jonathan Swartz - A configuration file pathname begins with three dots, e.g. ".../.perltidyrc", indicates that the file should be searched for starting in the current directory and working upwards. This makes it easier to have multiple projects each with their own .perltidyrc in their root directories. Thanks to Jonathan Swartz for this patch. - Added flag --notidy which disables all formatting and causes the input to be copied unchanged. This can be useful in conjunction with hierarchical F<.perltidyrc> files to prevent unwanted tidying. Thanks to Jonathan Swartz for this patch. - Added prefilters and postfilters in the call to the Tidy.pm module. Prefilters and postfilters. The prefilter is a code reference that will be applied to the source before tidying, and the postfilter is a code reference to the result before outputting. Thanks to Jonathan Swartz for this patch. He writes: This is useful for all manner of customizations. For example, I use it to convert the 'method' keyword to 'sub' so that perltidy will work for Method::Signature::Simple code: Perl::Tidy::perltidy( prefilter => sub { $_ = $_[0]; s/^method (.*)/sub $1 \#__METHOD/gm; return $_ }, postfilter => sub { $_ = $_[0]; s/^sub (.*?)\s* \#__METHOD/method $1/gm; return $_ } ); - The starting indentation level of sections of code entabbed with -et=n is correctly guessed if it was also produced with the same -et=n flag. This keeps the indentation stable on repeated formatting passes within an editor. Thanks to Sam Kington and Glenn. - Functions with prototype '&' had a space between the function and opening peren. This space now only occurs if the flag --space-function-paren (-sfp) is set. Thanks to Zrajm Akfohg. - Patch to never put spaces around a bare word in braces beginning with ^ as in: my $before = ${^PREMATCH}; even if requested with the -bt=0 flag because any spaces cause a syntax error in perl. Thanks to Fabrice Dulanoy. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 pkgsrc/devel/p5-Perl-Tidy/Makefile cvs rdiff -u -r1.7 -r1.8 pkgsrc/devel/p5-Perl-Tidy/distinfo Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.