Basic HTML version of Foils prepared April 16,1996

Foil 33 Constructor for class HTML::FormatPS - I

From Perl5 and Advanced Perl4 Features Computational Science for Information Age Course CPS616 Material -- April 16,1996. by Geoffrey C. Fox


$formatter = new(HTML::FormatPS , FontFamily => 'Helvetica', PaperSize => 'Letter'); # create instance of class given in first argument with following arguments overriding default paramters
$formatter holds a reference to a blessed hash
remember => is just a comma and arguments to a Perl subroutine are just a single list -- here of 5 entities
In package HTML::FormatPS subroutine new looks like this (continued on next foil)
sub new {
  • my $class = shift; # set $class as package name and remove from argument list using shift function which takes @_ as default argument in subroutine



© 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 Sat Sep 6 1997