dmq suggested that I implement this as a callback in the regexp_engine array. I.e. the engine would return a package name the regexp is to be blessed into. That would be a lot cleaner, so ignore this patch:)