[Padre-dev] Fwd: Re: [Padre] #148: Use consistent coding style in padre sources

Adam Kennedy adamkennedybackup at gmail.com
Tue Mar 24 19:20:00 PDT 2009


use Class::XSAccessor getters => { editor           => 'editor',
                                   filename         => 'filename',
  # TODO is this read_only or what?
                                   get_mimetype     => 'mimetype',
                                   get_newline_type => 'newline_type',
                                   errstr           => 'errstr',
    },
    setters => { _set_filename    => 'filename',       # TODO temporary hack
                 set_newline_type => 'newline_type',
                 set_mimetype     => 'mimetype',
                 set_errstr       => 'errstr',
                 set_editor       => 'editor',
    };

This kind of thing looks bizarre.

For this kind of thing, they should be indenting line below just to
the tab width.

On the subject of tabs, perltidy has destroyed most (but not all) of
all the tabs and replaced them with spaces. You might have to rollback
to a tabbed one and rerun it in order to fix that.

I think we were using cuddled } else { before, but these have been
turned into }\nelse {

It also is destroying low-width indented pairs, which turns

$style = {
    use_tabs => 1,
    tabwidth  => 1,
    indentwidth => 1,
};

into

$style = { use_tabs => 1, tabwidth => 8, indentwidth => 8, };

That's the obvious stuff that comes immediately to mind.

Adam K

2009/3/25 Jerome Quelin <jquelin at gmail.com>:
> On 09/03/24 11:03 +0200, Gabor Szabo wrote:
>> On Mon, Mar 23, 2009 at 7:59 PM, Jerome Quelin <jquelin at gmail.com> wrote:
>> let's remove the end of sub comments.
>> Was that added by tidy? Can it remove it?
>
> yes & yes.
> perltidyrc fixed in r3434, files re-tidyfied in r3435.
>
> other comments?
>
> jérôme
> --
> jquelin at gmail.com
> _______________________________________________
> Padre-dev mailing list
> Padre-dev at perlide.org
> http://mail.perlide.org/mailman/listinfo/padre-dev
>


More information about the Padre-dev mailing list