Here is my initial attempt at a module
FormParser. Its crude and ugly and its not an object yet, just a function housed in there. Next I'm working on making it an object (dear god) then i want to add handling for tags. So like a handler can be registered for each tag..
AddHandler("text",&FormText,&DisplayText)
where the first parameter is the tag, the second is a code ref for the form tag, and the third is the code ref for normal display.
I also wanna be able to snag attributes....i.e. have <select options="&listem"> and have the listem function called. It needs to be able to snag all tags of "select" with attribute of "options" and it needs to be passed the HTML entity to add the <option value="">name</option> tags inside.
I guess then each handler should accept a reference to the HTML::Element that it is handeling, and return that reference back.
I'm just kinda feeling out my ideas here as i implement them, for a kinda thought process record, and to get any feed back along the way. Better ways to handle, different ways, draw backs to my current way, etc. Please let me know if this is improper use of PM :-)
Update: Converted Module to class
Thanks,
Eric Hodges