I would first contact the author of the module and see if
you can work something out. Otherwise, fork. Beside that
some of the other mentioned points don't work, you'd break
all rules of software engineering. Your extension code is
now dependent on the implementation details of the original
code, and it's not using the API. If in a next version of
YAPE::Regex,
%pat is renamed, or
worse, due to reimplementation of the internals, there's now
a different datastructure, your extension code no longer works.
Abigail