As I go back through my old modules, sometimes I wonder why I made certain choices. Today its UNIVERSAL::require which is used a whole lot more than I thought.
0.02 Mon Jun 25 15:00:19 EDT 2001
* -->API CHANGE!<-- require() no longer dies on failure
Why did I decide to do that? I didn't record anything in the logs about it. I can't remember why I'd think $class->require shouldn't die seeing as how "require $class" does. And it introduced the clunky $UNIVERSAL::require::VERSION error global.
Bleh. Trying to decide if its worth the backwards incompat pain to change it.
another list (Score:1)
http://cpants.perl.org/dist/UNIVERSAL-exports [perl.org]
Seems quite similar to what gonzui says...
Re:another list (Score:2)
I wish... (Score:1)
Re:I wish... (Score:2)
And this really is the sort of thing which should be universal.
Re:I wish... (Score:1)
Module::Loader->load($module_name);What bugs me about the current approach is that when I use a CPAN module that loads this, it magically adds require() methods to all of my classes, whether I want them or not.
Re:I wish... (Score:2)
Yep, but I can't exactly back out of that now. Remember, UNIVERSAL::require is an implementation of a Perl 6 RFC. People started using it. Go figure.
require() is a special case. You're highly unlikely to create a method called "require" as its already a keyw
my vote (Score:1)
rjbs