Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Was my module used or required?

by grantm (Parson)
on Dec 06, 2002 at 10:13 UTC ( #218025=note: print w/ replies, xml ) Need Help??


in reply to Was my module used or required?

import is only called from use.

Replies are listed 'Best First'.
Re: Re: Was my module used or required?
by Biker (Priest) on Dec 06, 2002 at 11:13 UTC

    Excelent point, but only if my module would be a 'traditional' module using the Exporter.

    This is an OO module. No export, no import. (Unless I've misunderstood something fundamental again. ;-)

    Sorry I didn't mention that in my original post.


    Everything went worng, just as foreseen.

      You've probably already figured this out based on earlier answers, but the import() method is invoked regardless of whether you choose to inherit it from the Exporter module or not. In addition, there's no reason it has to actually import anything. In this sense, it's simply a hook you can use for anything you want when your module is invoked with use. Fear not for the sanctity of your OO model.

      Matt

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (7)
As of 2016-07-25 20:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What is your favorite alternate name for a (specific) keyboard key?


















    Results (227 votes). Check out past polls.