From ac2c5b33d9b72b2e481748d07da174ce3a849b18 Mon Sep 17 00:00:00 2001 From: Steve Hancock Date: Sun, 20 Sep 2020 18:56:14 -0700 Subject: [PATCH] update docs --- docs/BugLog.html | 29 +++++++++++++++++++++++++---- docs/perltidy.html | 13 ++++++++++--- local-docs/BugLog.pod | 22 ++++++++++++++++++++++ 3 files changed, 57 insertions(+), 7 deletions(-) diff --git a/docs/BugLog.html b/docs/BugLog.html index c3652f3b..30b1a49d 100644 --- a/docs/BugLog.html +++ b/docs/BugLog.html @@ -21,6 +21,27 @@
+
Switched from using an eval block to the -can() function for sub finish_formatting>
+
+ +

This is not a bug, but is cleaner coding and insures that error messages get reported. This change was made 20 Sep 2020.

+ +
+
fixed uninitialized value reference
+
+ +

The following message was generated during automated testing Use of uninitialized value $cti in numeric eq (==) at /home/steve/bin/Perl/Tidy/Formatter.pm line 12079. Use of uninitialized value $cti in numeric eq (==) at /home/steve/bin/Perl/Tidy/Formatter.pm line 12089. Use of uninitialized value $cti in numeric eq (==) at /home/steve/bin/Perl/Tidy/Formatter.pm line 12097.

+ +

The problem could be simplified to running perltidy -wn on this snippet:

+ +
     __PACKAGE__->load_components( qw(
+>         Core
+> 
+>     ) );
+ +

This was fixed 20 Sep 2020 in 'fixed_uninitialized_value', 8d6c4ed.

+ +
fix incorrect parsing of certain deprecated empty here-docs
@@ -55,7 +76,7 @@

A change was made to allow a '=>' at the end of a line to align vertically, provided that it aligns with two or more other '=>' tokens. This update was 14 Sep 2020, 'Allow line-ending '=>' to align vertically', ea96739.

-
fixed uninitialized value reference
+
fixed uninitialized value reference

The following message was generated when running perltidy on random text:

@@ -75,7 +96,7 @@

from becoming a zero length file. This could cause problems with other software. Fixed 13 Sep 2020, 'do not create a zero length file by deleting semicolons', b39195e.

-
fixed uninitialized value reference
+
fixed uninitialized value reference

The following message was generated when running perltidy on random text:

@@ -87,7 +108,7 @@

This was fixed 13 Sep 2020 in 'fixed unitialized variable problem ', adb2096.

-
fixed uninitialized value reference
+
fixed uninitialized value reference

The following message was generated when running perltidy on random text:

@@ -98,7 +119,7 @@

This was fixed 13 Sep 2020 in 'fixed unitialized variable problem', 5bf49a3.

-
fixed uninitialized value reference
+
fixed uninitialized value reference

The following message was generated when running perltidy on random text:

diff --git a/docs/perltidy.html b/docs/perltidy.html index 510d07d2..bc17a8b9 100644 --- a/docs/perltidy.html +++ b/docs/perltidy.html @@ -931,13 +931,13 @@

-skp or --space-keyword-paren

-

You will probably also want to use the flag -sfp (next item) too.

+

You may also want to use the flag -sfp (next item) too.

Space between all function names and opening parens
-

When an opening paren follows a function the default is not to introduce a space. To cause a space to be introduced use:

+

When an opening paren follows a function the default and recommended formatting is not to introduce a space. To cause a space to be introduced use:

-sfp or --space-function-paren

@@ -946,6 +946,13 @@

You will probably also want to use the flag -skp (previous item) too.

+

The reason this is not recommended is that spacing a function paren can make a program vulnerable to parsing problems by Perl. For example, the following two-line program will run as written but will have a syntax error if reformatted with -sfp:

+ +
  if ( -e filename() ) { print "exists\n"; }
+  sub filename { return $0 }
+ +

The syntax error can be removed if the line order is reversed, so that Perl parses 'sub filename' first.

+
-spp=n or --space-prototype-paren=n
@@ -1710,7 +1717,7 @@
    -
  • This parameter only applies if the opening brace is preceded by an '=' or '=>' or ','.

    +
  • This parameter only applies if the opening brace is preceded by an '=' or '=>'.

  • This parameter only applies if the contents of the container looks like a list. The contents need to contain some commas or '=>'s at the next interior level to be considered a list.

    diff --git a/local-docs/BugLog.pod b/local-docs/BugLog.pod index 0223f16e..46094a3e 100644 --- a/local-docs/BugLog.pod +++ b/local-docs/BugLog.pod @@ -5,6 +5,28 @@ found with the help of automated random testing. =over +=item Bcan() function for sub finish_formatting> + +This is not a bug, but is cleaner coding and insures that error messages get reported. +This change was made 20 Sep 2020. + + +=item B + +The following message was generated during automated testing + Use of uninitialized value $cti in numeric eq (==) at /home/steve/bin/Perl/Tidy/Formatter.pm line 12079. + Use of uninitialized value $cti in numeric eq (==) at /home/steve/bin/Perl/Tidy/Formatter.pm line 12089. + Use of uninitialized value $cti in numeric eq (==) at /home/steve/bin/Perl/Tidy/Formatter.pm line 12097. + +The problem could be simplified to running perltidy -wn on this snippet: + + __PACKAGE__->load_components( qw( +> Core +> +> ) ); + +This was fixed 20 Sep 2020 in 'fixed_uninitialized_value', 8d6c4ed. + =item B The following snippet was being incorrecly parsed: -- 2.39.5