<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On May 28, 2014, at 3:43 PM, Mitchell Elutovich &lt;<a href="mailto:melutovich@gmail.com">melutovich@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr"><font face="Times New Roman" size="3"><b>Louis Erickson:</b></font><br><div><b style="font-family: 'Times New Roman'; font-size: inherit;">&gt;</b><span style="">You mean like DBIx::Class::DynamicSubclass?  The only odd part is the union of sql select, which sounds like a view to me.</span></div>
<div><span style="">I'll have to think about the possibility of just using a view instead of a resultsource.</span></div><div><span style=""><br></span></div><div><span style="">Yes I've used DynamicSubclass in which it is described (in the&nbsp;</span><font>Cookbook.pod#Dynamic_Sub-classing_DBIx::Class_proxy_classes)&nbsp;</font><span style="">as:</span></div>
<div><span style=""><br></span></div><div><div style=""><font>|DBIx::Class classes are proxy classes, therefore some different techniques need to be employed for more than basic subclassing. In this example we have a single user table that carries a boolean bit for |admin. We would like to give the admin users objects (DBIx::Class::Row) the same methods as a regular user but also special admin only methods. It doesn't make sense to create two separate proxy-class |files for this. We would be copying all the user methods into the Admin class. There is a cleaner way to accomplish this.</font></div></div></div></blockquote><div><br></div><div>You could also put all the user methods in a Role and use it in both places.</div></div><div><br></div></body></html>