From cfa1604ee6fd3c789e409176ba06d4a7a8882898 Mon Sep 17 00:00:00 2001 From: Steve Hancock Date: Fri, 16 Aug 2024 07:07:36 -0700 Subject: [PATCH] update docs for 'our' variables in -wvt --- bin/perltidy | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/bin/perltidy b/bin/perltidy index 0476d4ca..38ea377a 100755 --- a/bin/perltidy +++ b/bin/perltidy @@ -6056,7 +6056,7 @@ This selects every if-chain which contains 2 or more B blocks: =item B -Lexical variables with certain properties of interest to a programmer can be +Variables with certain properties of interest to a programmer can be listed with B<--dump-unusual-variables> or B<-duv>. This parameter must be on the command line, along with a single file name. It causes perltidy to scan the file for certain variable types, write any found to the standard output, @@ -6079,9 +6079,9 @@ meaning: If there are a large number of issues it can be convenient to read the file into a spreadsheet. The checks are for lexical variables introduced by the -keywords B and B. The types of checks which are made are identified -in the output with one of the letters, B, B, B

, B, and B as -follows: +keywords B, B, and B, along with variables defined with +B. The types of checks which are made are identified in +the output with one of the letters B, B, B

, B, and B as follows: =over 4 @@ -6125,14 +6125,14 @@ block braces in order avoid warnings at temporary package changes. =item B -These are variables which are declared with C or C and not -referenced again within their scope. Calling them B is convenient but -not really accurate; this is a "gray area" for a program. There are some good -reasons for having such variables. For example, they might occur in a list of -values provided by another routine or data structure, and therefore must be -listed, even though they might not be referenced again. Having such variables -can make them immediately available for future development and debugging, and -can be beneficial for program clarity. +These are lexical variables declared with C or C (but not C) +and not referenced again within their scope. Calling them B is +convenient but not really accurate; this is a "gray area" for a program. There +are some good reasons for having such variables. For example, they might occur +in a list of values provided by another routine or data structure, and +therefore must be listed, even though they might not be referenced again. +Having such variables can make them immediately available for future +development and debugging, and can be beneficial for program clarity. B sometimes they can occur due to being orphaned by a coding change, due to a misspelling, or by having an unintentional preceding @@ -6159,6 +6159,9 @@ misspelling, so it can be worthwhile reviewing them. =back +B: The following B variables are exempt from warnings: +B<$VERSION>, B<@EXPORT>, B<@EXPORT_OK>, B<%EXPORT_TAGS>, B<@ISA, $AUTOLOAD>. + =item B The flag B<--warn-variable-types=string>, or B<-wvt=string>, can be used to -- 2.39.5