Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
Just to respond on your first question. Yes, it is useful to load all of the modules in a directory. As Aristotle mentioned it is nice if you are working on a plugin system. I have seen this used particularly in IRC bots.

You do NOT do require XML::*, but rather you require all of the files in a program specific directory.

Normally once you require all of the modules, you run a setup routine in each file that generates hooks. Then in IRC as an example, when an event occurs all of the associated hooks in your hash are executed.

ex. You ask the bot what time it is. Clock module gets the local time of the requestor. if smart *ss module loaded, generate smart *ss responce if normal module loaded, generate normal responce.

Another nice benifit is you can dynamicly load and unload the modules without having to shutdown the bot. So you can administer the bot remotly.


In reply to Re: Being helpful to a fault? by Zero_Flop
in thread Being helpful to a fault? by graff

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or or How to display code and escape characters are good places to start.
Log In?

What's my password?
Create A New User
Domain Nodelet?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2021-10-20 07:39 GMT
Find Nodes?
    Voting Booth?
    My first memorable Perl project was:

    Results (79 votes). Check out past polls.