Basic HTML version of Foils prepared Sept 20 97

Foil 33 Constructor for class HTML::FormatPS - I

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


1 $formatter = new(HTML::FormatPS , FontFamily => 'Helvetica', PaperSize => 'Letter'); # create instance of class given in first argument with following arguments overriding default paramters
2 $formatter holds a reference to a blessed hash
3 remember => is just a comma and arguments to a Perl subroutine are just a single list -- here of 5 entities
4 In package HTML::FormatPS subroutine new looks like this (continued on next foil)
5 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

in Table To:


© 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