in reply to Re: Moose attribute modification
in thread Moose attribute modification

This is exactly what I was trying to perform. The only difference was that text was not build in type but my own class

has 'text' => ( is => 'rw', isa => 'TextClass', );

I found a way around that, and don't have the exact code to see what I was doing wrong in that exact moment. But now I know that I was doing this in proper way, but the error was somewhere else.

Thank you

Replies are listed 'Best First'.
Re^3: Moose attribute modification
by Your Mother (Archbishop) on Apr 27, 2015 at 16:03 UTC
Re^3: Moose attribute modification
by CountZero (Bishop) on Apr 27, 2015 at 15:44 UTC
    If you want to use your own type, then have a look at MooseX::Types.

    CountZero

    A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

    My blog: Imperial Deltronics