in reply to Perltidy indents too much when there are stacked opening tokens

The current behavior is a good default, since stacked parens doesn't mean that all data is on the same depth (see discoverX ) and yes perltidy doesn't seem to have any finer control about data indentation.

$ 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 ☆☆☆☆ :)