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
|