<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
But that&#39; s my problem: One one web page I do not get all attributes I need<br>
to instantiate the object correctly. Simple unrealistic example. One one page<br>
the user can enter a &quot;name&quot; on the second the &quot;age&quot;. The object can be instatiated<br>
if you provide a valid name and age.</blockquote><div><br>Well, just instantiate an empty object then use the accessors Moose creates for you automagically. Accessors validate as well:<br><br>sub start_up : Local {<br>
    $c-&gt;session-&gt;{obj} = new MyClass();<br>
}<br>sub submit_name : Local {<br>    $c-&gt;session-&gt;{obj}-&gt;name( $c-&gt;req-&gt;params-&gt;{name} );<br>}<br>sub submit_age : Local {<br>
    $c-&gt;session-&gt;{obj}-&gt;age( $c-&gt;req-&gt;params-&gt;{age} );<br>
}<br> 
<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">But I can&#39;t instatiate<br>
the object because it throws an exception because age is not valid, isn&#39;t it?</blockquote><div> <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Or does Moose check constraints only on provided attributes. This can&#39;t be true<br>
with &quot;required&quot; attributes, can it?<br>
<div class="im"></div></blockquote><div><br>As long as the attribute is not &quot;required =&gt; 1&quot;, no exception is thrown. <br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im"><br>
&gt; Catalyst::Model::Adaptor may also come in handy if<br>
&gt; you feel you need to turn your class into a model.<br>
<br>
</div>What do you mean with that?<br>
<div><div></div><div class="h5"></div></div></blockquote><br>First, read up on the Model part of MVC, that&#39;s where most of your application storage should end up. Have you decided what are you going to do with the object once it&#39;s filled up? <br>
</div><br>--rodrigo<br>