]> git.donarmstrong.com Git - perltidy.git/commitdiff
document -bal=n flag
authorSteve Hancock <perltidy@users.sourceforge.net>
Sat, 29 Jan 2022 00:12:24 +0000 (16:12 -0800)
committerSteve Hancock <perltidy@users.sourceforge.net>
Sat, 29 Jan 2022 00:12:24 +0000 (16:12 -0800)
bin/perltidy
t/snippets/bal.in
t/snippets/expect/bal.bal1
t/snippets/expect/bal.bal2
t/snippets/expect/bal.def
t/snippets/packing_list.txt
t/snippets25.t
t/snippets26.t

index 218e309e79158f926659b6e06409d9839a83b29d..06a13a84e08c303c9308b0f3315da96c616d6b18 100755 (executable)
@@ -3174,6 +3174,24 @@ with the B<-wba> and B<-wbb> flags.  For example, to break before all operators
 except an B<=> one could use --bbao -wba='=' rather than listing every
 single perl operator except B<=> on a -wbb flag.
 
+=item B<bal=n, --break-after-labels=n>
+
+This flag controls whether or not a line break occurs after a label. There
+are three possible valuse for B<n>:
+
+  -bal=0  break if there is a break in the input [DEFAULt]
+  -bal=1  always break after a label
+  -bal=2  never break after a label
+
+For example,
+
+      # perltidy -bal=1
+      RETURN:
+        return;
+
+      # perltidy -bal=2
+      RETURN: return;
+
 =back
 
 =head2 Controlling List Formatting
index 9f266d7155c3e4a601944f5392d17fe9083e235f..387500bb9efec00ae4c01e4703e197ef897bf46f 100644 (file)
@@ -1,5 +1,5 @@
 {
   L1:
   L2:
-  L2: return;
+  L3: return;
 };
index cbc0440763683dc84f22439616abb6c8203bc69d..33aabf234dae39a9f97b96065c465f189315c79b 100644 (file)
@@ -1,6 +1,6 @@
 {
   L1:
   L2:
-  L2:
+  L3:
     return;
 };
index b9f32e3e1588dc651ad806e5dc2b6e6194bec07f..149f1cfe8a0cadb10dc04ac56ec8a84a5d8648f1 100644 (file)
@@ -1,3 +1,3 @@
 {
-  L1: L2: L2: return;
+  L1: L2: L3: return;
 };
index 9f266d7155c3e4a601944f5392d17fe9083e235f..387500bb9efec00ae4c01e4703e197ef897bf46f 100644 (file)
@@ -1,5 +1,5 @@
 {
   L1:
   L2:
-  L2: return;
+  L3: return;
 };
index 774a5880f298699e3b4d28c72884cafffa63501a..79792a54915ff2c711313e1ab62e2f9225cb92d0 100644 (file)
 ../snippets25.t        vxl.def
 ../snippets25.t        vxl.vxl1
 ../snippets25.t        vxl.vxl2
+../snippets25.t        bal.bal1
+../snippets26.t        bal.bal2
+../snippets26.t        bal.def
 ../snippets3.t ce_wn1.ce_wn
 ../snippets3.t ce_wn1.def
 ../snippets3.t colin.colin
 ../snippets9.t rt98902.def
 ../snippets9.t rt98902.rt98902
 ../snippets9.t rt99961.def
-../snippets25.t        bal.bal1
-../snippets26.t        bal.bal2
-../snippets26.t        bal.def
index 8c568163e46bb44ad9e0908420ee283d03baa778..83e2873ed48fe5f35594d4f41da819be5cadf990 100644 (file)
@@ -87,7 +87,7 @@ BEGIN {
 {
   L1:
   L2:
-  L2: return;
+  L3: return;
 };
 ----------
 
@@ -777,7 +777,7 @@ $co_unused      = ($color) ? 'on_green' : 'reverse';    # unused
 {
   L1:
   L2:
-  L2:
+  L3:
     return;
 };
 #19...........
index 7869dfeb120e61bac4ddcc4ddf5aadb02263f73a..7fa76d1f25b68b093bd6651e6321a4c2f5eff283 100644 (file)
@@ -33,7 +33,7 @@ BEGIN {
 {
   L1:
   L2:
-  L2: return;
+  L3: return;
 };
 ----------
     };
@@ -48,7 +48,7 @@ BEGIN {
             params => "bal2",
             expect => <<'#1...........',
 {
-  L1: L2: L2: return;
+  L1: L2: L3: return;
 };
 #1...........
         },
@@ -60,7 +60,7 @@ BEGIN {
 {
   L1:
   L2:
-  L2: return;
+  L3: return;
 };
 #2...........
         },