Hello,

I'm working on the code clean-up to release the "validate_rm"
functionality I mentioned recently on this list. I have a question on
how to best abstract a couple pieces of code in it. There are a couple
bits that should be variable in a general sense, but I haven't really
needed to change in my specific case. 

First, I have the strings "Invalid" and "Missing" embeddeed in the code
as the default messages to return when a field is missing or invalid. 
Other people will want to return strings in other languages. Should I
just use "gettext" here as a basic internationalization solution? 

Secondly, there is a bit of HTML that's used to format the message
returned, such as making it bold and red for example.

I'd like a solution where people can specify overrides if they'd like,
and not have to be explicit about it for every project, as the same
defaults will be good ones most of the time for anyone. 

With HTML::Template, I have a couple constructor options that I always
want to use, and I keep these in my project configuration file. Maybe
something like this could work here too? 

Thanks,

        Mark

--
http://mark.stosberg.com/ 


---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/[EMAIL PROTECTED]/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to