I always lived with the idea that "use base" was introduced with perl 5.6.0, and that we had to write
require BaseClass; # Thanks, merlyn
:)
use vars qw/@ISA/;
@ISA = qw/BaseClass/;
to be compatible with older perls.
Today I learned (http://search.cpan.org/dist/base/lib/base.pm) that "use base" was introduced with Perl 5.004_04!
Is this an odd case of cargo cult? Does it mean we can stop doing the "use vars '@ISA'" thing now?
Who wants their OO code to be compatible with perls older than 5.005?
And where did I get this notion from that it only became available in 5.6?
Sometimes it seems that experience just means you're set in your ways....
Missing the third part of that "use base" equiv... (Score:2)
Re:Missing the third part of that "use base" equiv (Score:1)
use base is problematic (Score:2)
I don't trust it. I prefer to call require or use myself, and consequentially, setting @ISA by hand.
Re:use base is problematic (Score:1)
No offence, but have you sent in a bug report with a patch, or even a failing test? I'm sure you must have hit an odd corner case. It's in the core, it's in broad use, so it must be okay for the majority of uses.
Re:use base is problematic (Score:1)
I wish that were true, but sadly, it's not. Quite a few core modules have big, big messes inside.
Re:use base is problematic (Score:1)
Any chance you could respond to my original questions? I'm really curious about it.
Re:use base is problematic (Score:2)
If you could steer base telling it exactly where you want it to load a module or not, then there would be far less of a problem. I person
Re: (Score:1)
I think you are confusing this with something else. The thing that was introduced with Perl 5.6 was
our, so you can sayinstead of