Am Mittwoch, 19. Mai 2010 00:07:59 schrieb Karen Etheridge:

> > But how am I supposed to tackle this problem using Moose/PRANG? Changing
> > the 'isa' property of Moose attributes at runtime based on the value of
> > another attribute (holding the MODS version number) seems weird.
> > I'd be glad if someone could describe possible solutions and/or point to
> > existing code solving this kind of problem.
> 
> How about a parameterized role that took the version number as a parameter?
> Then you could define the attribute type constraints with that version in
> mind, and all the work would be done at compile time.

Given that I know more or less nothing about parameterized roles (not that I'd 
know much about plain roles, either) I should probably shut up now and rtfm 
first - but the mentioning of "compile time" leaves me wondering how it would 
be possible to parse MODS records at runtime whose versions I don't know 
beforehand (or even how to deal with MODS records in different versions in a 
longer running process)?
But as I said I need to become acquainted with parameterized roles first.

Best,
Heiko

Reply via email to