in reply to Control warnings for each module by creating new warning categories

I didn't try your code, but from looking into https://perldoc.perl.org/warnings#Reporting-Warnings-from-a-Module I think your fears are justified.

(Tho the code examples might need correction regarding the package name abc:: )

But ...

> That makes refactoring to using warning categories very difficult

IMHO... You could locally (i.e. package wide) replace warn for your XXX:: only and handle all the magic inside a single routine.

Use subs for overriding built-ins.

Cheers Rolf
(addicted to the Perl Programming Language :)
see Wikisyntax for the Monastery