Skip to content

Commit

Permalink
Import of SHANCOCK/Perl-Tidy-20140711 from CPAN.
Browse files Browse the repository at this point in the history
gitpan-cpan-distribution: Perl-Tidy
gitpan-cpan-version:      20140711
gitpan-cpan-path:         SHANCOCK/Perl-Tidy-20140711.tar.gz
gitpan-cpan-author:       SHANCOCK
gitpan-cpan-maturity:     released
  • Loading branch information
shancock9 authored and Gitpan committed Oct 26, 2014
1 parent b50ba06 commit 26144ae
Show file tree
Hide file tree
Showing 6 changed files with 308 additions and 123 deletions.
62 changes: 62 additions & 0 deletions CHANGES
@@ -1,4 +1,66 @@
Perltidy Change Log
2014 07 11
- Fixed RT #94902: abbreviation parsing in .perltidyrc files was not
working for multi-line abbreviations. Thanks to Eric Fung for
supplying a patch.

- Fixed RT #95708, misparsing of a hash when the first key was a perl
keyword, causing a semicolon to be incorrectly added.

- Fixed RT #94338 for-loop in a parenthesized block-map. A code block within
parentheses of a map, sort, or grep function was being mistokenized. In
rare cases this could produce in an incorrect error message. The fix will
produce some minor formatting changes. Thanks to Daniel Trizen
discovering and documenting this.

- Fixed RT #94354, excess indentation for stacked tokens. Thanks to
Colin Williams for supplying a patch.

- Added support for experimental postfix dereferencing notation introduced in
perl 5.20. RT #96021.

- Updated documentation to clarify the behavior of the -io flag
in response to RT #95709. You can add -noll or -l=0 to prevent
long comments from being outdented when -io is used.

- Added a check to prevent a problem reported in RT #81866, where large
scripts which had been compressed to a single line could not be formatted
because of a check for VERSION for MakeMaker. The workaround was to
use -nvpl, but this shouldn't be necessary now.

- Fixed RT #96101; Closing brace of anonymous sub in a list was being
indented. For example, the closing brace of the anonymous sub below
will now be lined up with the word 'callback'. This problem
occured if there was no comma after the closing brace of the anonymous sub.
This update may cause minor changes to formatting of code with lists
of anonymous subs, especially TK code.

# OLD
my @menu_items = (

#...
{
path => '/_Operate/Transcode and split',
callback => sub {
return 1 if not $self->project_opened;
$self->comp('project')->transcode( split => 1 );
}
}
);

# NEW
my @menu_items = (

#...
{
path => '/_Operate/Transcode and split',
callback => sub {
return 1 if not $self->project_opened;
$self->comp('project')->transcode( split => 1 );
}
}
);

2014 03 28
- Fixed RT #94190 and debian Bug #742004: perltidy.LOG file left behind.
Thanks to George Hartzell for debugging this. The problem was
Expand Down
2 changes: 1 addition & 1 deletion META.yml
@@ -1,6 +1,6 @@
--- #YAML:1.0
name: Perl-Tidy
version: 20140328
version: 20140711
abstract: indent and reformat perl scripts
author:
- Steve Hancock <perltidy@perltidy.sourceforge.net>
Expand Down
15 changes: 10 additions & 5 deletions bin/perltidy
Expand Up @@ -503,10 +503,10 @@ exactly what flags were passed to perl.
=item B<-io>, B<--indent-only>
This flag is used to deactivate all formatting and line break changes
This flag is used to deactivate all whitespace and line break changes
within non-blank lines of code.
When it is in effect, the only change to the script will be
to the indentation and blank lines.
to the indentation and to the number of blank lines.
And any flags controlling whitespace and newlines will be ignored. You
might want to use this if you are perfectly happy with your whitespace
and line breaks, and merely want perltidy to handle the indentation.
Expand All @@ -520,6 +520,11 @@ B<--freeze-whitespace>.
If you also want to keep your existing blank lines exactly
as they are, you can add B<--freeze-blank-lines>.
With this option perltidy is still free to modify the indenting (and
outdenting) of code and comments as it normally would. If you also want to
prevent long comment lines from being outdented, you can add either B<-noll> or
B<-l=0>.
=item B<-ole=s>, B<--output-line-ending=s>
where s=C<win>, C<dos>, C<unix>, or C<mac>. This flag tells perltidy
Expand Down Expand Up @@ -2577,8 +2582,8 @@ are preceded by the name of the alias (without leading dashes), like this:
}
where B<newword> is the abbreviation, and B<opt1>, etc, are existing parameters
I<or other abbreviations>. The main syntax requirement is that
the new abbreviation must begin on a new line.
I<or other abbreviations>. The main syntax requirement is that the new
abbreviation along with its opening curly brace must begin on a new line.
Space before and after the curly braces is optional.
For a
specific example, the following line
Expand Down Expand Up @@ -3093,7 +3098,7 @@ perlstyle(1), Perl::Tidy(3)
=head1 VERSION
This man page documents perltidy version 20140328.
This man page documents perltidy version 20140711.
=head1 CREDITS
Expand Down
17 changes: 11 additions & 6 deletions docs/perltidy.1
Expand Up @@ -124,7 +124,7 @@
.\" ========================================================================
.\"
.IX Title "PERLTIDY 1"
.TH PERLTIDY 1 "2014-03-27" "perl v5.14.2" "User Contributed Perl Documentation"
.TH PERLTIDY 1 "2014-07-11" "perl v5.14.2" "User Contributed Perl Documentation"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
Expand Down Expand Up @@ -617,10 +617,10 @@ add a \fB\-c\fR and \fB\-x\fR if appropriate. The \fI.LOG\fR file will show
exactly what flags were passed to perl.
.IP "\fB\-io\fR, \fB\-\-indent\-only\fR" 4
.IX Item "-io, --indent-only"
This flag is used to deactivate all formatting and line break changes
This flag is used to deactivate all whitespace and line break changes
within non-blank lines of code.
When it is in effect, the only change to the script will be
to the indentation and blank lines.
to the indentation and to the number of blank lines.
And any flags controlling whitespace and newlines will be ignored. You
might want to use this if you are perfectly happy with your whitespace
and line breaks, and merely want perltidy to handle the indentation.
Expand All @@ -633,6 +633,11 @@ Setting this flag is equivalent to setting \fB\-\-freeze\-newlines\fR and
.Sp
If you also want to keep your existing blank lines exactly
as they are, you can add \fB\-\-freeze\-blank\-lines\fR.
.Sp
With this option perltidy is still free to modify the indenting (and
outdenting) of code and comments as it normally would. If you also want to
prevent long comment lines from being outdented, you can add either \fB\-noll\fR or
\&\fB\-l=0\fR.
.IP "\fB\-ole=s\fR, \fB\-\-output\-line\-ending=s\fR" 4
.IX Item "-ole=s, --output-line-ending=s"
where s=\f(CW\*(C`win\*(C'\fR, \f(CW\*(C`dos\*(C'\fR, \f(CW\*(C`unix\*(C'\fR, or \f(CW\*(C`mac\*(C'\fR. This flag tells perltidy
Expand Down Expand Up @@ -2675,8 +2680,8 @@ are preceded by the name of the alias (without leading dashes), like this:
.Ve
.Sp
where \fBnewword\fR is the abbreviation, and \fBopt1\fR, etc, are existing parameters
\&\fIor other abbreviations\fR. The main syntax requirement is that
the new abbreviation must begin on a new line.
\&\fIor other abbreviations\fR. The main syntax requirement is that the new
abbreviation along with its opening curly brace must begin on a new line.
Space before and after the curly braces is optional.
For a
specific example, the following line
Expand Down Expand Up @@ -3183,7 +3188,7 @@ purpose of this rule is to prevent generating confusing filenames such as
\&\fIperlstyle\fR\|(1), \fIPerl::Tidy\fR\|(3)
.SH "VERSION"
.IX Header "VERSION"
This man page documents perltidy version 20140328.
This man page documents perltidy version 20140711.
.SH "CREDITS"
.IX Header "CREDITS"
Michael Cartmell supplied code for adaptation to \s-1VMS\s0 and helped with
Expand Down

0 comments on commit 26144ae

Please sign in to comment.