I typically create utility classes that I load to use for common functions:<br><br>package MyApp::Util::Date;<br><br>require Exporter;<br>push our @ISA, &#39;Exporter&#39;;<br><br>our @EXPORT = qw( pretty_date );<br><br>sub pretty_date {
<br>}<br><br># and later<br><br>package MyApp::Model::Entry;<br><br>use MyApp::Util::Date;<br><br>sub show_start_end_date {<br>&nbsp;&nbsp;&nbsp; my $self = shift;<br>&nbsp;&nbsp;&nbsp; Jifty-&gt;web-&gt;out(pretty_date($self-&gt;start_date) . &#39; - &#39; . pretty_date($self-&gt;end_date));
<br><br>Cheers,<br>Andrew<br><br><div class="gmail_quote">On Nov 27, 2007 8:47 AM, Henry Baragar &lt;<a href="mailto:Henry.Baragar@instantiated.ca">Henry.Baragar@instantiated.ca</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello,<br><br>I have a few help subroutines (e.g. prettyDate) that are used across models<br>throughout the system. &nbsp;Where is the appropriate place to put these<br>subroutines?<br><br>In other Mason applications, we have put them in the autohandler. &nbsp;Is this the
<br>correct place in Jifty?<br><br>Regards,<br>Henry<br>_______________________________________________<br>jifty-devel mailing list<br><a href="mailto:jifty-devel@lists.jifty.org">jifty-devel@lists.jifty.org</a><br><a href="http://lists.jifty.org/cgi-bin/mailman/listinfo/jifty-devel" target="_blank">
http://lists.jifty.org/cgi-bin/mailman/listinfo/jifty-devel</a><br></blockquote></div><br>