See Bio::Perl for examples.
These classes are part of "Computational Mutation Expression Toolkit" project at European Bioinformatics Institute <http://www.ebi.ac.uk/mutations/toolkit/>, but they are written to be as general as possinble.
Bio::Variation name space contains modules to store sequence variation information as differences between the reference sequence and changes sequences. Also included are classes to write out and recrete objects from EMBL-like flat files and XML. Lastly, there are simple classes to calculate values for sequence change objects.
See "Computational Mutation Expression Toolkit" web pages for more information:
http://www.ebi.ac.uk/mutations/toolkit/
To install Bio::Variation, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Bio::Variation
CPAN shell
perl -MCPAN -e shell install Bio::Variation
For more information on module installation, please visit the detailed CPAN module installation guide.