The mantra sounds good to me: use tidy to format code the same, so changesets across users truely measure code changes, not code formatting changes.
But try as I might, I just can't live with perltidy. No matter how many times I futz with options, it does what I want in some places, and completely makes no sense in other places.
For example:
BEGIN { use base qw/Class::Accessor::Grouped/; use Class::Inspector (); use Scalar::Util (); use Mango::Exception ();
__PACKAGE__->mk_group_accessors('component_class', qw/result_class/); };
BEGIN { use base qw/Class::Accessor::Grouped/; use Class::Inspector (); use Scalar::Util (); use Mango::Exception ();
__PACKAGE__->mk_group_accessors('component_class', qw/result_class/); }
sub delete { my $self = shift;
return $self->meta->provider->delete_attributes( $self->meta->parent, {id => $self->id} ); };
sub delete { my $self = shift;
return $self->meta->provider->delete_attributes($self->meta->parent, {id => $self->id}); }
-l=72 -i=4 -ci=4 -bar -ce -nsbl -sot -sct -pt=2 -sbt=2 -bt=2 -bbt=2 -nsfs -asc -dsm -nbbb
I sympathize with you on the list indentation, but I think your desire to have a line here and there that disobeys the 80 column wrap is kind of pathological. Maybe the list indentation can be changed though. I know you can tell it to leave the way you split the list into lines alone. Of course then you have to get EVERYONE you share code with to use your settings, which is why I just use all the defaults.
Re:It's about consistency
jk2addict on 2008-04-09T00:06:09
True. In the end, it's goin to be a matter of learning to worry about what the code does, and leave how it 'reads' to tindy and moving on with life.