3.13 Additional Topics


Included in this section are a few more topics you may find useful.

3.13.1 Using Class::Struct to Define Classes

The kind of simple OO class that I've developed in this chapter has proved so useful that some clever folks have written a Perl module Class::Struct that automates the construction of classes of this type.

It's worth examining Class::Struct because it can be a great timesaver for some situations. It's been used to create classes for many widely used modules. Type:

 perldoc Class::Struct 

to get the whole story.

3.13.2 Class Inheritance

An important part of OO programming deals with the use of one class to help define another. For instance, you may have a class Protein that defines attributes common to all proteins . You can then use the Protein class to define a new class ZincFingers , which perhaps would have all the attributes of the Protein class plus some additional attributes relevant to the study of zinc fingers.

You'll see the use of class inheritance in the next chapter.

3.13.3 Bioperl

Bioperl is a collection of modules of intense interest to the Perl bioinformatics programmer, written mostly in OO style. I'll take a look at the Bioperl software in Chapter 9.



Mastering Perl for Bioinformatics
Mastering Perl for Bioinformatics
ISBN: 0596003072
EAN: 2147483647
Year: 2003
Pages: 156

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net