experimental feature close(-pad=2048); is not working for me;
e.g.:
$gds2File->close(-pad=>2048);
but the output file is not a multiple of 2048. The value returned by
$gds2File->tellSize is not correct; so somewhere the output file is not
accumulating the correct byte offset?. Here is a suggestion to
use "seek" on the open file, to get the byte offset, instead of keeping
track of it yourself:
sub close
{
...
...
if ((defined $pad)&&($pad > 0))
{
my $fh = $self -> {'FileHandle'};
seek $fh,0,2; # seek to EOF
my $fileSize = tell($fh);
# my $fileSize = $self -> tellSize ## this is not working!
....
....
Padding the file to 2048 is good because some of the CAD tools give
warning messages. I would go as far as having this be the default
behavior.