in reply to Mixing @EXPORT and use base

And, yes, I'm aware of Spiffy, but I'd prefer something that's a little lighter-weight.
Smells at the Spiffy docs... Oh my... Brian Ingerson has finally gone completely mad!
You can also use the traditional use base 'MySpiffyBaseModule'; syntax and everything will work exactly the same. The only caveat is that Spiffy.pm must already be loaded. That's because Spiffy rewires base.pm on the fly to do all the Spiffy magics.
I don't think the semantics you want are easy to achieve, and might trip up other modules in the process. Also, I'm curious why you don't use class methods and inheritance. It might look more complicated, but if you store the classname in a varible, it tends to be pretty short anyway.

example:

my $f = 'Foo'; $f->external();
Only 1 character more...

If I'm missing something here, please tell me.

J.

Replies are listed 'Best First'.
Re^2: Mixing @EXPORT and use base
by bmcatt (Friar) on Jul 07, 2004 at 18:38 UTC
    The problem with $f->external() is that it adds to the argument list being passed to external().

    Ideally, I don't need to (nor want to) make external() smarter about whether it's being called as a class method or just an exported subroutine.