Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
This first example of Perl code defines a very small Perl class. This code does several new things, which I will explain in detail after the code.
This first version of the class is called Gene1, and it demonstrates the essential features needed to implement a simple class. Gene1 looks similar to the last module definition in Chapter 1, but with a few new wrinkles that transform it into OO software. I progress from Gene1.pm to Gene2.pm, then to Gene3.pm, and then to the final version, Gene.pm.