From 83d8349cb71ad4513d0c102c1888d8725551b524 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ville=20Skytt=C3=A4?= Date: Wed, 14 Aug 2019 11:36:16 +0300 Subject: [PATCH] Spelling and grammar fixes --- CHANGES.md | 14 +++++++------- bin/perltidy | 2 +- dev-bin/build.pl | 2 +- docs/ChangeLog.html | 14 +++++++------- docs/perltidy.html | 2 +- docs/tutorial.html | 2 +- lib/Perl/Tidy.pm | 4 ++-- lib/Perl/Tidy/Formatter.pm | 6 +++--- lib/Perl/Tidy/IndentationItem.pm | 2 +- lib/Perl/Tidy/Tokenizer.pm | 2 +- lib/Perl/Tidy/VerticalAligner.pm | 2 +- local-docs/tutorial.pod | 2 +- 12 files changed, 27 insertions(+), 27 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index f1dc44c5..8ba1ccfc 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -375,7 +375,7 @@ ## 2017 05 21 - Fixed debian #862667: failure to check for perltidy.ERR deletion can lead - to overwriting abritrary files by symlink attack. Perltidy was continuing + to overwriting arbitrary files by symlink attack. Perltidy was continuing to write files after an unlink failure. Thanks to Don Armstrong for a patch. @@ -398,7 +398,7 @@ with --backup-and-modify-in-place. Thanks to Heinz Knutzen for this patch. - Fixed minor formatting issue where one-line blocks for subs with signatures - were unnecesarily broken + were unnecessarily broken - RT #32905, patch to fix utf-8 error when output was STDOUT. @@ -477,7 +477,7 @@ - Fixed RT #107832 and #106492, lack of vertical alignment of two lines when -boc flag (break at old commas) is set. This bug was - inadvertantly introduced in previous bug fix RT #98902. + inadvertently introduced in previous bug fix RT #98902. - Some common extensions to Perl syntax are handled better. In particular, the following snippet is now foratted cleanly: @@ -563,7 +563,7 @@ - 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. + occurred 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. @@ -1277,7 +1277,7 @@ : undef; -Text following un-parenthesized if/unless/while/until statements get a - full level of indentation. Suggested by Jeff Armstorng and others. + full level of indentation. Suggested by Jeff Armstrong and others. OLD: return $ship->chargeWeapons("phaser-canon") if $encounter->description eq 'klingon' @@ -2054,7 +2054,7 @@ external calls to Tidy.pm module. Fixed incorrect html title when Tidy.pm is called with IO::Scalar or IO::Array source. - -Output file permissons are now set as follows. An output script file + -Output file permissions are now set as follows. An output script file gets the same permission as the input file, except that owner read/write permission is added (otherwise, perltidy could not be rerun). Html output files use system defaults. Previously chmod 0755 @@ -3018,7 +3018,7 @@ -I updated the tokenizer to allow $#+ and $#-, which seem to be new to Perl 5.6. Some experimenting with a recent version of Perl indicated that it allows these non-alphanumeric '$#' array maximum index - varaibles: $#: $#- $#+ so I updated the parser accordingly. Only $#: + variables: $#: $#- $#+ so I updated the parser accordingly. Only $#: seems to be valid in older versions of Perl. -Fixed a rare formatting problem with -lp (and -gnu) which caused diff --git a/bin/perltidy b/bin/perltidy index 15a06359..753da185 100755 --- a/bin/perltidy +++ b/bin/perltidy @@ -3643,7 +3643,7 @@ where B is some new extension. In order to provides the user some flexibility, the following convention is used in all cases to decide if a leading '.' should be used. If the extension C begins with C, C, or C<0-9>, then it will be appended to the filename with -an intermediate '.' (or perhaps an '_' on VMS systems). Otherwise, it +an intermediate '.' (or perhaps a '_' on VMS systems). Otherwise, it will be appended directly. For example, suppose the file is F. For C<-bext=old>, a '.' is diff --git a/dev-bin/build.pl b/dev-bin/build.pl index 50723e15..842e3b74 100755 --- a/dev-bin/build.pl +++ b/dev-bin/build.pl @@ -372,7 +372,7 @@ A Release VERSION is an integer, the approximate YYMMDD of the release. A Development VERSION is (Last Release).(Development Number) The Development Number is a 2 digit number starting at 01 after a release is -continually bumped along at significant points during developement. +continually bumped along at significant points during development. The VERSION reported by Perl::Tidy.pm is '$reported_VERSION' What would you like to do? diff --git a/docs/ChangeLog.html b/docs/ChangeLog.html index 895f0427..77005926 100644 --- a/docs/ChangeLog.html +++ b/docs/ChangeLog.html @@ -364,7 +364,7 @@ NEW:

2017 05 21

- Fixed debian #862667: failure to check for perltidy.ERR deletion can lead 
-  to overwriting abritrary files by symlink attack. Perltidy was continuing 
+  to overwriting arbitrary files by symlink attack. Perltidy was continuing
   to write files after an unlink failure.  Thanks to Don Armstrong 
   for a patch.
 
@@ -387,7 +387,7 @@ NEW:
   with --backup-and-modify-in-place. Thanks to Heinz Knutzen for this patch.
 
 - Fixed minor formatting issue where one-line blocks for subs with signatures 
-  were unnecesarily broken
+  were unnecessarily broken
 
 - RT #32905, patch to fix utf-8 error when output was STDOUT. 
 
@@ -468,7 +468,7 @@ NEW:
 
  - Fixed RT #107832 and #106492, lack of vertical alignment of two lines
    when -boc flag (break at old commas) is set.  This bug was 
-   inadvertantly introduced in previous bug fix RT #98902. 
+   inadvertently introduced in previous bug fix RT #98902.
 
  - Some common extensions to Perl syntax are handled better.
    In particular, the following snippet is now foratted cleanly:
@@ -556,7 +556,7 @@ NEW:
 - 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.  
+  occurred 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.
 
@@ -1283,7 +1283,7 @@ of nested statements.
      : undef;
 
 -Text following un-parenthesized if/unless/while/until statements get a
-full level of indentation.  Suggested by Jeff Armstorng and others. 
+full level of indentation.  Suggested by Jeff Armstrong and others.
 OLD:
    return $ship->chargeWeapons("phaser-canon")
      if $encounter->description eq 'klingon'
@@ -2073,7 +2073,7 @@ a terminal =cut.  Thanks to Mike Birdsall for reporting this.
  external calls to Tidy.pm module.  Fixed incorrect html title when
  Tidy.pm is called with IO::Scalar or IO::Array source.
 
--Output file permissons are now set as follows.  An output script file
+-Output file permissions are now set as follows.  An output script file
  gets the same permission as the input file, except that owner
  read/write permission is added (otherwise, perltidy could not be
  rerun).  Html output files use system defaults.  Previously chmod 0755
@@ -3043,7 +3043,7 @@ new: my $fee = CalcReserveFee(
 -I updated the tokenizer to allow $#+ and $#-, which seem to be new to
 Perl 5.6.  Some experimenting with a recent version of Perl indicated
 that it allows these non-alphanumeric '$#' array maximum index
-varaibles: $#: $#- $#+ so I updated the parser accordingly.  Only $#:
+variables: $#: $#- $#+ so I updated the parser accordingly.  Only $#:
 seems to be valid in older versions of Perl.
 
 -Fixed a rare formatting problem with -lp (and -gnu) which caused
diff --git a/docs/perltidy.html b/docs/perltidy.html
index 732e3d2e..abaddf00 100644
--- a/docs/perltidy.html
+++ b/docs/perltidy.html
@@ -2798,7 +2798,7 @@
 
 

Specifying File Extensions

-

Several parameters allow default file extensions to be overridden. For example, a backup file extension may be specified with -bext=ext, where ext is some new extension. In order to provides the user some flexibility, the following convention is used in all cases to decide if a leading '.' should be used. If the extension ext begins with A-Z, a-z, or 0-9, then it will be appended to the filename with an intermediate '.' (or perhaps an '_' on VMS systems). Otherwise, it will be appended directly.

+

Several parameters allow default file extensions to be overridden. For example, a backup file extension may be specified with -bext=ext, where ext is some new extension. In order to provides the user some flexibility, the following convention is used in all cases to decide if a leading '.' should be used. If the extension ext begins with A-Z, a-z, or 0-9, then it will be appended to the filename with an intermediate '.' (or perhaps a '_' on VMS systems). Otherwise, it will be appended directly.

For example, suppose the file is somefile.pl. For -bext=old, a '.' is added to give somefile.pl.old. For -bext=.old, no additional '.' is added, so again the backup file is somefile.pl.old. For -bext=~, then no dot is added, and the backup file will be somefile.pl~ .

diff --git a/docs/tutorial.html b/docs/tutorial.html index 7031763b..4e11efc4 100644 --- a/docs/tutorial.html +++ b/docs/tutorial.html @@ -136,7 +136,7 @@
 perltidy *.pl
-

and in this case, each of the output files will be have a name equal to the input file with the extension .tdy appended. If you decide that the formatting is acceptable, you will want to backup your originals and then remove the .tdy extensions from the reformatted files. There is an powerful perl script called rename that can be used for this purpose; if you don't have it, you can find it for example in The Perl Cookbook.

+

and in this case, each of the output files will be have a name equal to the input file with the extension .tdy appended. If you decide that the formatting is acceptable, you will want to backup your originals and then remove the .tdy extensions from the reformatted files. There is a powerful perl script called rename that can be used for this purpose; if you don't have it, you can find it for example in The Perl Cookbook.

If you find that the formatting done by perltidy is usually acceptable, you may want to save some effort by letting perltidy do a simple backup of the original files and then reformat them in place. You specify this with a -b flag. For example, the command

diff --git a/lib/Perl/Tidy.pm b/lib/Perl/Tidy.pm index 7ee4d1ac..341a18df 100644 --- a/lib/Perl/Tidy.pm +++ b/lib/Perl/Tidy.pm @@ -105,7 +105,7 @@ BEGIN { # To make the number continually increasing, the Development Number is a 2 # digit number starting at 01 after a release is continually bumped along - # at significant points during developement. If it ever reaches 99 then the + # at significant points during development. If it ever reaches 99 then the # Release version must be bumped, and it is probably past time for a # release anyway. @@ -3625,7 +3625,7 @@ I/O control Basic Options: -i=n use n columns per indentation level (default n=4) - -t tabs: use one tab character per indentation level, not recommeded + -t tabs: use one tab character per indentation level, not recommended -nt no tabs: use n spaces per indentation level (default) -et=n entab leading whitespace n spaces per tab; not recommended -io "indent only": just do indentation, no other formatting. diff --git a/lib/Perl/Tidy/Formatter.pm b/lib/Perl/Tidy/Formatter.pm index d313c84b..4da556c5 100644 --- a/lib/Perl/Tidy/Formatter.pm +++ b/lib/Perl/Tidy/Formatter.pm @@ -971,7 +971,7 @@ sub keyword_group_scan { # Scan all lines looking for runs of consecutive lines beginning with # selected keywords. Example keywords are 'my', 'our', 'local', ... but # they may be anything. We will set flags requesting that blanks be - # inserted around and withing them according to input parameters. Note + # inserted around and within them according to input parameters. Note # that we are scanning the lines as they came in in the input stream, so # they are not necessarily well formatted. @@ -10703,7 +10703,7 @@ sub lookup_opening_indentation { # undo continuation indentation of a terminal closing token if # it is the last token before a level decrease. This will allow # a closing token to line up with its opening counterpart, and - # avoids a indentation jump larger than 1 level. + # avoids an indentation jump larger than 1 level. if ( $types_to_go[$i_terminal] =~ /^[\}\]\)R]$/ && $i_terminal == $ibeg && defined($K_beg) ) @@ -16656,7 +16656,7 @@ sub set_continuation_breaks { # RT #104427: Dont break before opening sub brace because # sub block breaks handled at higher level, unless - # it looks like the preceeding list is long and broken + # it looks like the preceding list is long and broken && !( $next_nonblank_block_type =~ /^sub\b/ && ( $nesting_depth_to_go[$i_begin] == diff --git a/lib/Perl/Tidy/IndentationItem.pm b/lib/Perl/Tidy/IndentationItem.pm index eb1aae6e..9eb7d51d 100644 --- a/lib/Perl/Tidy/IndentationItem.pm +++ b/lib/Perl/Tidy/IndentationItem.pm @@ -90,7 +90,7 @@ sub permanently_decrease_available_spaces { sub tentatively_decrease_available_spaces { # We are asked to tentatively delete $spaces_needed of indentation - # for a indentation item. We may want to undo this later. NOTE: if + # for an indentation item. We may want to undo this later. NOTE: if # there are child nodes, their total SPACES must be reduced by the # caller. my ( $item, $spaces_needed ) = @_; diff --git a/lib/Perl/Tidy/Tokenizer.pm b/lib/Perl/Tidy/Tokenizer.pm index 9742f764..7c3abb2a 100644 --- a/lib/Perl/Tidy/Tokenizer.pm +++ b/lib/Perl/Tidy/Tokenizer.pm @@ -6274,7 +6274,7 @@ sub scan_identifier_do { $attrs = $2; # If we also found the sub name on this call then append PROTO. - # This is not necessary but for compatability with previous + # This is not necessary but for compatibility with previous # versions when the -csc flag is used: if ( $match && $proto ) { $tok .= $proto; diff --git a/lib/Perl/Tidy/VerticalAligner.pm b/lib/Perl/Tidy/VerticalAligner.pm index c768bab1..6f4eff25 100644 --- a/lib/Perl/Tidy/VerticalAligner.pm +++ b/lib/Perl/Tidy/VerticalAligner.pm @@ -2287,7 +2287,7 @@ EOM sub is_deletable_token { - # Determine if an token with no match possibility can be removed to + # Determine if a token with no match possibility can be removed to # improve chances of making an alignment. my ( $token, $i, $imax, $jline, $i_eq ) = @_; diff --git a/local-docs/tutorial.pod b/local-docs/tutorial.pod index 9d1f2606..76a87dc0 100644 --- a/local-docs/tutorial.pod +++ b/local-docs/tutorial.pod @@ -165,7 +165,7 @@ and in this case, each of the output files will be have a name equal to the input file with the extension F<.tdy> appended. If you decide that the formatting is acceptable, you will want to backup your originals and then remove the F<.tdy> extensions from the reformatted files. There is -an powerful perl script called C that can be used for this +a powerful perl script called C that can be used for this purpose; if you don't have it, you can find it for example in B. -- 2.39.5