2 |
sub papersize {
-
my($self, $val) = @_; # $self is reference to object
-
$val = "\u\L$val"; # Uppercase first, lowercase following letters in string $val
-
my($width, $height) = @{$PaperSizes{$val}};
-
return 0 unless defined $width;
-
$self->{papersize} = $val; # reset object attributes
-
$self->{paperwidth} = $width;
-
$self->{paperheight} = $height;
-
1; # return 1 (or 0 if error) BUT not $self
|