demerphq said,
Personally I think that Lincoln Stein, as wonderful as he is should _never_ have written self_or_default or self_or_CGI. The code in these two routines _barely_ works, and should not be copied.
My personal opinion of CGI.pm is that it is
great! I couldn't care less if Lincoln made things harder for people to inherit from his module, because it offers a good deal of original ideas. I like the idea of allowing both OO and non-OO, especially when updating a module to a more object orriented architecture. You then allow for an object which can hold its own options, or an a module global variable, which must be parsed before another one. It allows me to do this:
# Set variables for the next group of operations.
MyMod->opt(1 => 1,
2 => 1);
for ( 1..10 ) {
MyMod->set( $_ );
MyMod->do_op();
}
or set options for each object if the object require differant options. Just document the inflexibility of the code, and that people shouldn't try to emulate the code unless they know what they're doing and I think it's pretty fair.