There is no such option in the Perl Tidy manpage. You can control if there is a newline after that bracket, but not before. There is the -bli
option that controls the break before opening blocks of subs, but it does not affect lists and arrays.
any option to control perltidy to break before the bracket in array define?
Frage
I have a code snippet like:
my $a_box = [
[$a11, $a12, $a13, $a14, $a15, $a16],
[$a21, $a22, $a23, $a24, $a25, $a26],
[$a31, $a32, $a33, $a34, $a35, $a36],
[$a41, $a42, $a43, $a44, $a45, $a46],
[$a51, $a52, $a53, $a54, $a55, $a56],
[$a61, $a62, $a63, $a64, $a65, $a66],
];
is there any option in perltidy can make it break before the bracket like this:
my $a_box =
[
[$a11, $a12, $a13, $a14, $a15, $a16],
[$a21, $a22, $a23, $a24, $a25, $a26],
[$a31, $a32, $a33, $a34, $a35, $a36],
[$a41, $a42, $a43, $a44, $a45, $a46],
[$a51, $a52, $a53, $a54, $a55, $a56],
[$a61, $a62, $a63, $a64, $a65, $a66],
];
any suggestion is appreciated, thanks!
Lösung
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow