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"; } #### perl -i.bak -pe"if(s/^(func|method)/#<<<\n$1/){ s/$/#>>>/ }" temp.pl #### 7: syntax error at ') {', didn't see one of: case elsif for foreach given if switch unless until when while #### --- 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_token} ) { my $list = join( ' ', sort keys %is_blocktype_with_paren ); + warning("I SAW '$last_nonblank_token' \n"); warning( "syntax error at ') {', didn't see one of: $list\n"); }