On Thu, Apr 22, 2010 at 03:25:41PM -0700, Kate Yoak wrote:
> Another issue:
> 
> Can parameter use builder and have it defined within the same module?
> 
> I've tried
> 
> parameter foo => (is => 'rw', builder => '_foo');
> 
> with _foo() defined above this statement, below it, inside the role  
> block (pretty sure it fails before getting inside the role).  No  
> good.  It says: Error:  Class::MOP::Class::__ANON__::SERIAL::1 does  
> not support builder method ...
> 
> What should I do?

You should have the builder method defined outside the role {} block, i.e.
at the same level as the parameter declaration itself.

Can you give an example where you would need to define the builder inside
the role block? This sounds rather strange to me.


-- 
          "I felt a kind of forlorn sense of being lost in a world of
          incredibly stupid and malicious dwarfs." - Aleister Crowley
            .             .            .            .             .
Karen Etheridge, [email protected]       GCS C+++$ USL+++$ P+++$ w--- M++
http://etheridge.ca/                      PS++ PE-- b++ DI++++ e++ h(-)

Reply via email to