> >  -----Original Message-----
> > From:       [EMAIL PROTECTED] 
> > [mailto:[EMAIL PROTECTED]]  On Behalf 
> > Of Mohammed Khatib
> > Sent:       Wednesday, September 25, 2002 2:32 AM
> > To: Perl
> > Subject:    Coding style filter
> > 
> > Hi Everyone,
> > 
> > When I started working here (TimeBase) 2 years ago, the programmers
> > had not a hint of coding standards when developing their programs. I
> > started to spread the word of coding standards and their importance,
> > and now things have improved, but their still not good enough.
> >
> > I'll soon be developing a standards document for us to follow, but I
> > have strong feeling that not all of us (including myself) will
> > comply. That's why the thought of a coding filter program popped
> > into my head. I guess different coding filters will be adapted to
> > different styles, but does anyone know of a standards filter that
> > can be customised to a person's needs?
> >
> > If I don't find one out there, it might be worthwhile
> > developing one.
> > 
> > Many thanks,
> > Mk
>
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Joe Rioux
> Sent: Wednesday, September 25, 2002 1:33 PM
> To: [EMAIL PROTECTED]; Perl
> Subject: RE: Coding style filter
> 
> 
> What you're looking for is typically called a "pretty printer".
>
> Problem with those is when you want to do diffs. If you squish a
> source file through a pretty printer, then check it in (assuming
> you're using source control) then when you try to do a diff on the
> file to see the differences, you don't see only the material
> differences. You see the "beautifying" ones as well. They're not
> practical (IMO) when you have teams working on common source files.
> 

You could try an editor like GNU emacs (with cperl-mode) that
optionally autoformats as you type. You can choose one of the
styles it provides (CPerl, PerlStyle, GNU, etc.) or make your
own. It also allows you to reformat code to the currently
selected style.

HTH,
Randy.


_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to