@joaoantonioverdade or @luismsgomes:
This is just a minor issue.
$node->set_form(undef) creates many undef warnings,
one of them was in this very block when checking
$last_node->form =~ /^[[:alpha:]]+$/
Setting form (or lemma) to an empty string (or undef) is a hack,
which may lead to strange problems (though now I am not aware of any).
Deleting the node, seems to be a more elegant solution.
@joaoantonioverdade or @luismsgomes: This is just a minor issue.
$node->set_form(undef)
creates many undef warnings, one of them was in this very block when checking$last_node->form =~ /^[[:alpha:]]+$/
Setting form (or lemma) to an empty string (or undef) is a hack, which may lead to strange problems (though now I am not aware of any). Deleting the node, seems to be a more elegant solution.