<div class="gmail_quote">On Fri, Nov 4, 2011 at 12:04 PM, Toby Corkindale <span dir="ltr"><<a href="mailto:toby.corkindale@strategicdata.com.au">toby.corkindale@strategicdata.com.au</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div class="im"></div>
Inflation from the database is easy.<br>
For deflation, you can override the actual field name methods, plus update() and create() methods, and handle the conversion there? It's a bit messy, but works.<font color="#888888"></font><br></blockquote></div><br>

It could be more setup but definitely worth it if you have many of these fields. Try looking at other modules on cpan which do similar things eg:<br>
<br>DBIx::Class::InflateColumn::IP<br>
and<br>
DBIx::Class::TimeStamp<br>
<br>
they appear to define a new field type with a corresponding component 
plugin which takes care of the {in,de}flate actions for you.<br>
<br>