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"); }

In reply to Re: How can I make perltidy work with Method::Signatures? by Anonymous Monk
in thread How can I make perltidy work with Method::Signatures? by daverave

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.