Hi, everybody. I'm in need of advice here...
I'm putting together some things I have and creating a module named Lingua::Identification. I won't go through details on why should this module be created or anything else (unless someone asks me too) since that has already been done (though not here, I know). My problem is: the module has to retain some information about each known language; this could easily be done by having persist on the module itself... however, I also want the user to be able to *teach* a new language to the module... how should I keep that information? One possibility would be to force each known language to become a module (Lingua:Identification::EN for English, etc)... the downside of this solution is that once I have 50 languages, I'll have 51 modules... :-| Still, CPAN can take care of things for us and install them all without problem... but still, I'm not convinced... It is true that this would allow the user to install only the desired languages and also ease the learning process for new ones... besides, the module wouldn't have to read unnecessary information on startup (there is the possibility of identifying between only two languages, for example, so you don't need to prepare all of them). Another possibility is to have everything in a single file, and allow the user to set up a configuration file himself, which may contain other languages... I don't know what's best... can you help me with this? Can you tell me your opinion? I've done quite a lot of programming in Perl, but I've never upload a decent module on CPAN... I'm trying to do that for the first time, and I don't want to screw things up right from the beginning... Thanks to all of you. Best regards, jac