On Tue, May 18, 2010 at 11:59:57PM +0200, Heiko Jansen wrote:
> Dear Moose-icians,

Heh, I like that one!

> 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.


-- 
     "Each has his past shut in him like the leaves of a book known to him
      by heart and his friends can only read the title." - Virginia Woolf
            .             .            .            .             .
Karen Etheridge, ka...@etheridge.ca       GCS C+++$ USL+++$ P+++$ w--- M++
http://etheridge.ca/                      PS++ PE-- b++ DI++++ e++ h(-)

Reply via email to