2ge has asked for the wisdom of the Perl Monks concerning the following question:
I am quite new to modules, I did some, but nothing big, I am not good in OO. Ok, now I have new task - it is about fetching, parsing and inserting to db some information from internet. Lets say we have 50 of sources, and I'd like to have all routines for 1 source in 1 module. So modules should look like this:
Robot::Base - reading config file into hash (?); - connecting to db (?); - db statements; - global subroutines; - reading all Robot::Web::*
Robot::Web::Something - "Something" is name of web; - all routines regarding "Something";
Robot.pl pseudo code should look like this:
Please what do you think about this scheme? Tell some better options how to achieve this. Thanks.... $cfg = GetCfg(); for my $web (@{$cfg->{webs}) { Process($web); } ...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Module hierarchy help
by ptum (Priest) on Jul 27, 2006 at 13:30 UTC | |
by 2ge (Scribe) on Jul 27, 2006 at 13:51 UTC | |
by ptum (Priest) on Jul 27, 2006 at 14:02 UTC | |
by 2ge (Scribe) on Jul 27, 2006 at 14:30 UTC | |
by Asim (Hermit) on Jul 27, 2006 at 15:44 UTC | |
| |
|
Re: Module hierarchy help
by duc (Beadle) on Jul 27, 2006 at 13:01 UTC | |
by 2ge (Scribe) on Jul 27, 2006 at 13:27 UTC | |
by duc (Beadle) on Jul 27, 2006 at 14:03 UTC |