Gergely Nagy <algernon@balabit.hu> writes:
Unless you want to work on this yourself further, I'll spice it up with error handling and basic configurability in the next few days.
...where by days, I obviously meant months. Sorry!
As you mentioned in person, it would be nice if the template function could be configured, preferably globally, so that one wouldn't have to repeat the same parameters over and over again in every template where it would be used.
Things like returning country vs country code, the location of the database and so on and so forth should be configurable.
I ended up not caring about configurability for now. The country vs country code thing is fairly easy, that can be done with some command-line parsing. Using a different database is harder, as right now, I open the database on module load. With a @declare, it's easy to make the database configurable, but only globally: you wouldn't be able to use multiple databases. I'm not sure whether that's a problem or not. Nevertheless, it is something I don't want to deal with right now. The result is currently sitting on my feature/3.4/template-func/geoip branch, but I will likely merge it into merge-queue/3.4 once I added command-line parsing. -- |8]