[OT] PerlTidy option to close parens on function params *only*

Discussion in 'Perl Misc' started by newsbot@cox.net, May 2, 2005.

  1. Guest

    Since I don't consider this question strictly Perl related, I've marked
    as [OT]. Yet at the same time, I'm not sure where else to ask it since
    no one other than Perl users would conceiveably use PerlTidy.

    That said, I want to provide an option or options to PerlTidy that
    format parenthesis in this fashion:

    for (1..10) {
    do_something( $_, "Dude" );
    }

    -or-

    if ($a < 10) {
    do_something( $a, "Dude" );
    }

    In other words, parens after keywords like "while," "for," and "if"
    etc. stay tight (eg. no whitespace), whilst parameters passed to
    subroutines are formated with one space as with "do_somthing()" above.

    The PerlTidy man page provides no options that I can see other than
    tight parens EVERYWHERE. Also the PerlTidy home page offers nothing
    revealing either and there is no list associated with this product that
    I can see. I was hoping I might trip across someone here that is
    experienced enough with PerlTidy to offer a solution to the above.

    Right now, I'm living with tight parens globally. But I'd rather have
    white space around my parameters to subroutines.

    Thanks!
    -ceo
    , May 2, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Stephen Ferg

    How to avoid "f.close" (no parens) bug?

    Stephen Ferg, Feb 11, 2004, in forum: Python
    Replies:
    12
    Views:
    483
    Nick Craig-Wood
    Feb 13, 2004
  2. Batista, Facundo

    RE: How to avoid "f.close" (no parens) bug?

    Batista, Facundo, Feb 11, 2004, in forum: Python
    Replies:
    2
    Views:
    240
    Neil Hodgson
    Feb 11, 2004
  3. Batista, Facundo

    RE: How to avoid "f.close" (no parens) bug?

    Batista, Facundo, Feb 11, 2004, in forum: Python
    Replies:
    2
    Views:
    272
    Peter Hansen
    Feb 11, 2004
  4. Michael Chermside

    How to avoid "f.close" (no parens) bug?

    Michael Chermside, Feb 13, 2004, in forum: Python
    Replies:
    0
    Views:
    250
    Michael Chermside
    Feb 13, 2004
  5. Guest

    Ruby equiv of Perltidy?

    Guest, Jun 2, 2005, in forum: Ruby
    Replies:
    4
    Views:
    382
    Eric Hodel
    Jun 2, 2005
Loading...

Share This Page