I feel like I'm missing something (well, I have zero experience in creating CPAN modules, so that may be where I'm wrong) but I think you may be trying too hard.
First, I don't get how compiling the regexes at the program build-time is better. Perl being an interpreted language, there is a build-time each time you start a program, so doing something during build-time or at the beginning of run-time is equivalent time-wise. And even if you didn't use qred regexes, later version of perl have become quite good at guessing when not to recompile regexes.
Second, and I already have a few answers in mind for this one, (since I already feel like I'm being wrong somewhere, I'll just keep going) if the stringification compiled regex doesn't suit your needs, why don't you dump the pattern before compilation (something like $pat = qq/REGEX/; say $pat; $reg = qr/$pat/i;)? The first of the answers that come to mind being "It's not just the pattern, but the modifiers that must be compared".
In reply to Re: Dumping regexp for Perl versions earlier than 5.14
by Eily
in thread Dumping regexp for Perl versions earlier than 5.14
by perlancar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |