|
|
| Come for the quick hacks, stay for the epiphanies. | |
| PerlMonks |
Re: What is maintainable perl code?by Juerd (Abbot) |
| on Sep 20, 2002 at 03:14 UTC ( [id://199396]=note: print w/replies, xml ) | Need Help?? |
This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.
Maintainable Perl code is not different from any other maintainable code. While it is true that a single character may behave like what would be ten lines in another language, that doesn't make the program less maintainable. In fact, I think a single character is a lot easier to maintain. It's easier to maintain 150 lines of Perl than the 500-line C equivalent. Perl does more in a single line, so don't expect to read 5 lines per second. As an example, let's take a piece of DBD::mysql: The Perl version of the same would probably be something like (untested): The more statements you have, the more statements can be malfunctioning. On the other hand, removing one character from this regex may break it. Is Perl code maintainable? IMHO, it is. Is it readable? If you know Perl, it is -- I admit: the C version is easier for Perl coders than the Perl version is for C coders.
In Section
Meditations
|
|
||||||||||||||||||||||||