On Sat, 10 Nov 2001, Rex Arul wrote:

> a) traditional sequential script programming, of course, with a good level
> of partitioning logic with various subroutines avoiding global variables to
> the least,
> b) use judiciously the power of packages/modules (with exporting variables,
> subroutines etc)
> c) use object oriented approach with a performance penalty of 20-50% as
> claimed by Damian?

I tend to use OOP in my code, since I work with a team of about 40
engineers, most of whom are Java programmers[0].  The Perl code I write
has to be maintainable and extensible.  For some things, an
object-oriented approach isn't necessary, for very simple scripts that do
nothing more than modify a configuration file.  But for the bigger
utilites I develop, I tend to stuff things into a module so I can build
several smaller, specialized tools that follow the Unix principle of doing
one thing only and doing it very well.

As far as performance issues go, that is very dependent upon what you are
writing.  A database application (web-based or not) with complex business
rules is much more maintainable using an object-oriented approach.  I
would rather sacrifice a little performance for maintainability.[1]

-- Brett

[0] The Java is used for a telecom-based application server, and the code
I write is used to install, configure, maintain and monitor said
application server.  While a few other people have dabbled in Perl in my
company, I am the only one who was specifically hired as a Perl
programmer.

[1] It should also be pointed out that one can program using the
object-oriented paradigm without having to use specific object-oriented
syntax.
                                          http://www.chapelperilous.net/
------------------------------------------------------------------------
Profanity is the one language all programmers know best.


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to