A General Model for Maintainable Perl Programs
Set aside all the wisecracks about Perl being unmaintainable or useful only for small scripts. Also be prepared to renounce the widely held assumption that it’s not a truly object-oriented language. In this section we will develop a general Perl framework that will let you quickly add new features to applications and adapt applications to changing database structures.
The code that follows is complex and requires an in-depth knowledge
of Perl. Among the features of Perl we exploit are references,
recursion, variable type checking, function argument manipulation
(the $_[0] syntax), dynamic array building through
push statements, and multidimensional
hashes—and of course, lots of object-oriented techniques. These
features are amply explained in other Perl books, notably
Programming
Perl
by Larry
Wall, Tom
Christiansen, and Jon
Orwant
(O’Reilly).
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access