Home Accessibility Courses Diary The Mouth Forum Resources Site Map About Us Contact
Python and Tcl - public course schedule [here]
Private courses on your site - see [here]
Please ask about maintenance training for Perl, PHP, Lua, etc

Well House Consultants
You are on the site of Well House Consultants who provide Open Source Training Courses and business hotel accommodation. You are welcome to browse and use our resources subject to our copyright statement and to add in links from your pages to ours.
Other subject areas - resources
Java Resources
Well House Manor Resources
Perl Resources
Python Resources
PHP Resources
Object Orientation and General topics
MySQL Resources
Linux / LAMP / Tomcat Resources
Well House Consultants Resources
Extras Resources
C and C++ Resources
Ruby Resources
Tcl/Tk Resources
Web and Intranet Resources
Perl module P213
Creating your own Classes
Exercises, examples and other material relating to training module P213. This topic is presented on public course Perl for Larger Projects
In Perl, you can define a class of objects in a module. All the standard Object Oriented facilities are available, and we start with constructors, destructors, instances and accessor methods.

Related technical and longer articles
Is Perl truly an OO language?
Object Orientation in Perl - First Steps

Tips and short articles on this subject
http://wellho.info/4607   Classes and object - first steps in Perl 6  2016-01-02    
http://wellho.info/2169   When should I use OO techniques?  2014-11-05    
http://wellho.info/3833   Learning to use existing classes in Perl  2012-08-18    
http://wellho.info/3098   Learning Object Orientation in Perl through bananas and perhaps Moose  2010-12-21    
http://wellho.info/3059   Object Orientation in an hour and other Perl Lectures  2010-12-04    
http://wellho.info/2969   What does blessing a variable in Perl mean?  2010-09-24    
http://wellho.info/2877   Further more advanced Perl examples  2010-07-30   (longer)
http://wellho.info/2834   Teaching examples in Perl - third and final part  2010-06-27   (longer)
http://wellho.info/1925   Introduction to Object Oriented Programming  2008-12-10   (longer)
http://wellho.info/1864   Object Oriented Perl - First Steps  2008-11-02    
http://wellho.info/1664   Example of OO in Perl  2008-06-03    
http://wellho.info/227   Bellringing and Programming and Objects and Perl  2008-05-16    
http://wellho.info/1435   Object Oriented Programming in Perl - Course  2007-11-19    
http://wellho.info/1320   Perl for Larger Projects - Object Oriented Perl  2007-08-28    
http://wellho.info/983   Blessing in Perl / Member variable in Ruby  2006-12-14   (short)
http://wellho.info/975   Answering ALL the delegate's Perl questions  2006-12-09    
http://wellho.info/246   When to bless a Perl variable  2006-06-05    
Examples from our training material
3cl   Object Orientation - 2 classes and polymorphism
antest   Introduction to Objects
at2   Hello Perl Object World
bd1.pm   A simple class, using a scalar to store object information
bd2.pm   A simple class, using a list to store information about each object
bd3.pm   A simple class, storing each object in a hash
big   How Object Inheritance is done in Perl
blessing   Blessing and resultant polymorphism
book.pm   A simple class with a constructor and 2 access methods
ce.pm   Object interface to call events
commute.pm   commute.pm - used in factory demo
higloo   houses and igloos - an OO example
housing.pm   Definition of house, castle and igloo classes
journey   Call to factory class. See ramble.pm and commute.pm
massage.pl   Template object and test program
medium   OO with inheritance demonstrated
message.htp   Sample template for use in other demos
message.pl   None-OO example of template filling
need1   calling subs via bare words
need2   Solving the bare word
nsp   variables in packages (autovivification!)
oco   Using the house, castle and igloo classes
peeps.pm   Definition of two classes and polymorphism
ramble.pm   A class that includes a factory method
roar   Sample program to use room.pm
room.pm   A simple class which uses a blessed hash
scemail   quick check of email address format
small   True OO example
spammer   Using global matching to extract all matches
thing.pm   Generic class for use during exercises
tiny   Towards OO in Perl
ub2   A test program to use the "book" class
ub3   Another test program to use the book class
ubany.pl   Test program for ub1 ub2 and ub3 classes
usebook   Sample application, constructs and uses book objects
wheretogo   Example that uses commute.pm and ramble.pm
Background information
Some modules are available for download as a sample of our material or under an Open Training Notes License for free download from http://www.training-notes.co.uk.
Topics covered in this module
Resume - using a class.
Background to instance variables - pointers and references.
new - the constructor.
Other methods in a class.
Using more complex structures to store data in a class.
Extended capabilities by using hashes.
Complete learning
If you are looking for a complete course and not just a information on a single subject, visit our Listing and schedule page.

Well House Consultants specialise in training courses in Python, Perl, PHP, and MySQL. We run Private Courses throughout the UK (and beyond for longer courses), and Public Courses at our training centre in Melksham, Wiltshire, England. It's surprisingly cost effective to come on our public courses - even if you live in a different country or continent to us.

We have a technical library of over 700 books on the subjects on which we teach. These books are available for reference at our training centre. Also available is the Opentalk Forum for discussion of technical questions.

You can Add a comment or ranking to this page

© WELL HOUSE CONSULTANTS LTD., 2019: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01225 708225 • FAX: 01225 793803 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho

PAGE: http://www.wellho.net/resources/P213new.html • PAGE BUILT: Sat Oct 16 08:23:07 2010 • BUILD SYSTEM: wizard