Subject: | Bug in PostScript::TextBlock.pm |
Date: | Tue, 18 Jun 2013 16:46:26 -0500 |
To: | bug-PostScript [...] rt.cpan.org |
From: | Tilghman Lesher <tilghman [...] meg.abyt.es> |
Found a bug in PostScript::TextBlock, line 57, which is the return statement of
sub numElements
It gives an error about the statement while strict refs are in place.
The fix is to use a slightly better syntax:
sub numElements {
# Returns the number of elements in the TextBlock
#
my $self = shift;
return scalar(@$self);
}
Cleaner to read and doesn't emit a warning. Better code all around.
-Tilghman