Removing AUTOLOAD from CGI.pm

I'm about to release an update to CGI.pm that will strip out all of the AUTOLOAD and deferred compile optimization. I'm reasonably confident that this will have no impact other than adding a few tens of milliseconds to the startup time for any scripts using CGI.pm. Of note is that CGI::Pretty will now be deprecated, along with the -complile pragma and ->compile method. If you are using the -any pragma and have arbitrary tags (or typo's) in your code then your code *is* likely to break.

This optimization was added twenty years ago, it has little to no benefit now and makes the code difficult to deal with as well as falsifying test coverage metrics. It needs to go. Given the legacy sprawl of CGI.pm there may be bugs lurking; if you're using CGI.pm please test this release. The DEV release is available on CPAN:

https://metacpan.org/release/LEEJO/CGI-4.13_02

I'm noting this here in the hopes that it will get out onto the blogosphere and then beyond for any users of CGI.pm that this may affect. If you do use it, test it, and it breaks somehow then please raise an issue on github.

I'm going to let the DEV release sit on CPAN for a while (a few weeks, a couple of months maybe) until it has made its way through cpantesters and long enough to allow people to test it. I will also be notifying bugzilla, twiki, et al.

More information can be found in the Changes file for the current DEV release, along with links to the relevant github issues.

1 Comment

I'm just happy that CGI.pm, which has made me a lot of money over the decades, is getting some attention. Yeay!

Leave a comment

About Lee J

user-pic I blog about Perl.