xgettext: Perl: Avoid unbounded nesting_depth growth, part 2.
* gettext-tools/src/x-perl.c: Return from extract_balanced when a subroutine's
definition terminates.
(extract_balanced): Test whether the first token is 'sub'. If so, don't use
the usual symbol parsing and return when a token_type_lbrace was seen.
Test cases:
==========================================
sub import {
}
==========================================
sub import {
if (!$module_loaded) {
Texinfo::XSLoader::override("", "");
Texinfo::XSLoader::override("", "");
$module_loaded = 1;
}
goto &Exporter::import;
}
==========================================