<div><br></div>I have two databases that are very similar.  For example, the &quot;person&quot; table in one db has an &quot;email&quot; column and the other does not have that column, otherwise the tables are the same.<div>

<br></div><div>My application uses the schema with the table that has the &quot;email&quot; column, so there&#39;s places in the application that call $person-&gt;get_column( &#39;email&#39; ), and also $person_rs-&gt;create( { name =&gt; $name, email =&gt; $email } );  </div>

<div><br></div><div>Now, I want to use the second schema with the same application, but as mentioned above does not have an &quot;email&quot; column on the person table.  it&#39;s not important that the column does not exist.</div>

<div><br></div><div>My question is what can I do to make get_column and create (and other methods that assume there is an &quot;email&quot; column) work without this column defined in the result class.  Is there any way to have define a column that is never used when constructing database queries?</div>

<div><br></div><div><br></div><div>I can create a method in the result class of the schema that doesn&#39;t have that column:</div><div><br></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">

<div>sub email {  return &#39;<a href="mailto:dummy@example.com">dummy@example.com</a>&#39; }</div></blockquote><div><br></div><div>And that will handle $person-&gt;email and even $person-&gt;email( $new_email ), although I don&#39;t see that ever being used.</div>

<div><br></div><div>I&#39;m not sure how to best override get_column(), though.  I suppose the best approach would be to replace all the get_column() calls in the application with actual method calls (i.e. -&gt;email).  Or is there a way to override get_column in this case?</div>

<div><br></div><div>What about the create() method?  Use an &quot;around create =&gt; sub {}&quot; in the ResultClass and strip out the &quot;email&quot; column?</div><div><br></div><div><br></div><div><br><div><div><br>
-- <br>
Bill Moseley<br><a href="mailto:moseley@hank.org" target="_blank">moseley@hank.org</a><br>
</div></div></div>