Re: Class Methods in Moose?

[email protected] (Cory G Watson)
Newsgroups perl.moose
Message-ID <[email protected]>
On Oct 22, 2008, at 10:16 AM, Ovid wrote:

> I'm working on a legacy system with a database which has some  
> issues.  Right now, I need to populate a Moose enum with allowable  
> enum values from a database.  The problem is that the Moose objects  
> don't know about the database when they're used (or even when  
> they're instantiated), thus making it impossible to populate those  
> enums.


Could you set the attribute to lazy, then set the default to use the  
db to fetch your values?

Cory G Watson
http://www.onemogin.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.