diff options
author | wiz <wiz@pkgsrc.org> | 2011-08-16 23:04:17 +0000 |
---|---|---|
committer | wiz <wiz@pkgsrc.org> | 2011-08-16 23:04:17 +0000 |
commit | 8a3e0c9b708b071cc2f12fb7b0456078bd839fd3 (patch) | |
tree | 129df7dadbc9dcf39310a025833a782eafc9651d | |
parent | 22ad4641729424f925e01e1ff539879f77007251 (diff) | |
download | pkgsrc-8a3e0c9b708b071cc2f12fb7b0456078bd839fd3.tar.gz |
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.
-rw-r--r-- | devel/p5-Perl-Tidy/Makefile | 5 | ||||
-rw-r--r-- | devel/p5-Perl-Tidy/distinfo | 8 |
2 files changed, 6 insertions, 7 deletions
diff --git a/devel/p5-Perl-Tidy/Makefile b/devel/p5-Perl-Tidy/Makefile index 0306a2e7e87..15a32a8cc5c 100644 --- a/devel/p5-Perl-Tidy/Makefile +++ b/devel/p5-Perl-Tidy/Makefile @@ -1,9 +1,8 @@ -# $NetBSD: Makefile,v 1.14 2011/08/14 12:26:30 obache Exp $ +# $NetBSD: Makefile,v 1.15 2011/08/16 23:04:17 wiz Exp $ # -DISTNAME= Perl-Tidy-20090616 +DISTNAME= Perl-Tidy-20101217 PKGNAME= p5-${DISTNAME} -PKGREVISION= 2 SVR4_PKGNAME= p5pt CATEGORIES= devel perl5 MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=perltidy/} diff --git a/devel/p5-Perl-Tidy/distinfo b/devel/p5-Perl-Tidy/distinfo index ac3dd20aa66..0deb2d5fed7 100644 --- a/devel/p5-Perl-Tidy/distinfo +++ b/devel/p5-Perl-Tidy/distinfo @@ -1,5 +1,5 @@ -$NetBSD: distinfo,v 1.7 2009/07/07 20:05:26 sno Exp $ +$NetBSD: distinfo,v 1.8 2011/08/16 23:04:17 wiz Exp $ -SHA1 (Perl-Tidy-20090616.tar.gz) = e14d4ec61e546a3208f3e790edacc500431c6253 -RMD160 (Perl-Tidy-20090616.tar.gz) = 66ac8463c079cc030063271961260933b5fdb549 -Size (Perl-Tidy-20090616.tar.gz) = 383497 bytes +SHA1 (Perl-Tidy-20101217.tar.gz) = d9efd9bd29403fcda7d6f1667b0b0bdd62d8d744 +RMD160 (Perl-Tidy-20101217.tar.gz) = bd28763749424456598135e877890c97fdf594cc +Size (Perl-Tidy-20101217.tar.gz) = 387834 bytes |