in reply to Perltidy indents too much when there are stacked opening tokens
$ perltidy -st -sct -sot tsttdy.pl sub discoverX { return [ { 'name' => $name, 'version' => $VERSION, }, [ 1, 2, 3 ] ]; } sub discover1 { return { 'name' => $name, 'version' => $VERSION, }; } sub discover2 { return [ { 'name' => $name, 'version' => $VERSION, } ]; } sub discover3 { return [ [ { 'name' => $name, 'version' => $VERSION, } ] ]; }
For what it's worth emacs has an option to calculate the indentation relative from the last statement:
sub discoverX { return [{ 'name' => $name, 'version' => $VERSION, }, [1,2,3] ]; }
Maybe you want to propose this feature to the maintainer?
I'm not too convinced. But YMMV ...
Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
|
|---|