Basic HTML version of Foils prepared Sept 20 97

Foil 32 Perl5 Object Model -- II

From Perl5 and Advanced Perl4 Features Computational Science for Information Age Course CPS616 -- Sept 20 97. by Geoffrey C. Fox,Nancy McCracken,Tom Scavo


Objects are further:
  • objects are created by a "constructor" which is any suitable function in given module but CONVENTION says for one to call this constructor new
  • so new is (arbitary) name for a subroutine and not a language construct
A class method is a conventional Perl5 subroutine defined in given class (package) which expects its first argument to be either an object reference or for static methods (independent of object instance) the class name
The class name IS the package name



© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Sun Apr 5 1998