in reply to Module hierarchy help

So, if I get it right, you will have 50 files under the directory Robot::Web. Ok.

I think it is a good idea to separate routines following what they do. So maybe you could try to find the similitude between the routines for different sources and pass them arguments about the source. I think if a routine is specific to one application it should not be in a module. just be sure you don't work for nothing ;).

To give an example, I have made some modules myself and one of them is EditFiles.pm. It contains routines to modify a file or find information in that file and I am using this module in a number of script.

I think you have good start.

Replies are listed 'Best First'.
Re^2: Module hierarchy help
by 2ge (Scribe) on Jul 27, 2006 at 13:27 UTC
    Thanks for answer duc,

    yes, I am planning to have 50 files under dir Robot::Web. Each webpage is so different, that I _have_ to use other rutine for download, other for parsing, and ofcourse I dont want to have all that in 1 file/place. So I decided to do this.

    When some routine _could_ be used in more than 1 web (insert to db for example), I will put in Base. For example I dont know, if I should load all those modules to robot.pl, or in robot.pl will be only Base, and in Base all Robot::Web::* will be loaded. I think better is 2nd option, but never did this and dont know how to do that :(
      For that I think the second option is better. You would just have to put something like use Web::Something but I agree 50 module doing almost the same work but in different manner looks like a nightmare. I don't know how to help you on that though and I understand what you mean.