Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Mixing @EXPORT and use base (simple)

by tye (Sage)
on Jul 07, 2004 at 20:19 UTC ( [id://372535]=note: print w/replies, xml ) Need Help??


in reply to Mixing @EXPORT and use base

I don't see how

sub Foo::import { External->export_to_level( 2, @_ ) }

is a lot of moving parts.

- tye        

Replies are listed 'Best First'.
Re^2: Mixing @EXPORT and use base (simple)
by bmcatt (Friar) on Jul 08, 2004 at 13:59 UTC
    Well... Ok. "Moving parts" was a misnomer, but export_to_level doesn't solve the issue of use base. The other two bits that make me uncomfortable are that the "2" is a bit of a magic number (and doesn't allow for further "inheritance" of the exports) and I'd need to do that explicitly for every module that needs to generate exports.

    By just altering @EXPORT in the base and putting an explicit import in the derived class, I get exactly the same behavior.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://372535]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2024-04-24 00:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found