What version of Perl are you using? Mine is fairly old, but your perlstruct.pl doesn't look validly constructed to me. This is confirmed when I try running it with
use strict; use warnings;.
Type => 'A'{
Name => 'Abstract'{
};
};
Type => 'B'{
Name => 'Preface'{
};
};
especially looks strange.