in reply to How can I make perltidy work with Method::Signatures?

To go the comment route, take for example temp.pl
package Foo; use Method::Signatures; method new (%args) { return bless {%args}, $self; } method get ($key) { return $self->{$key}; } method set ($key, $val) { return $self->{$key} = $val; } func hello($greeting, $place) { print "$greeting, $place!\n"; }
modify temp.pl with
perl -i.bak -pe"if(s/^(func|method)/#<<<\n$1/){ s/$/#>>>/ }" temp.pl
and perltidy will leave those declarations alone, but it will complain
with
7: syntax error at ') {', didn't see one of: case elsif for foreach + given if switch unless until when while
what it didn't see turns out to be new|get|set|hello
--- Tidy.pm.orig 2009-06-16 13:00:50.000000000 -0700 +++ Tidy.pm 2010-10-11 03:38:42.015625000 -0700 @@ -22604,6 +22604,7 @@ # check for syntax error here; unless ( $is_blocktype_with_paren{$last_nonblank_toke +n} ) { my $list = join( ' ', sort keys %is_blocktype_wit +h_paren ); + warning("I SAW '$last_nonblank_token' \n"); warning( "syntax error at ') {', didn't see one of: $l +ist\n"); }