I'm interested in learning how to use Moose to create an object at run-time. I have a CSV file with field names and lengths, and I have a flat file that's in that format. I'd love to be able to go from those two data sources and come up with a collection of Moose objects that I can then Do Stuff With.
My research so far has turned up this contentious solution and the suggestion to look at Moose::Meta::Class. However, that last module seems to build on another class, when I don't want to do that -- I want to create a class so that (among other reasons) I can take advantage of Moose's code to check that a field's data is of the right type.
Update: Upon re-reading this, after posting it, I realized I'm not as clear here as I was when the question was in my head. I want to add attributes at run-time, rather than specify them (has, etc.) beforehand.
Alex / talexb / Toronto
Thanks PJ. We owe you so much. Groklaw -- RIP -- 2003 to 2013.