[ic] Adding a system wide module

Jeff Fearn jefffearn at gmail.com
Mon Jan 31 20:21:03 EST 2005


On Mon, 31 Jan 2005 07:57:36 -0700, Duane Hinkley <duane at dhwd.com> wrote:
> Jeff Fearn wrote:
> 
> >Hi, I want to allow the Date::Calc modules functions to be used in the
> >HTML pages on my site. Is there one place I can put this that will
> >allow it to be run on any store on the server?
> >
> >Jeff
> >
> Jeff,
> 
> That's a piece of cake.  You just need a user tag.  Look in your
> Interchange directory under /usr/lib/interchange/code and you'll find a
> bunch of examples.  The ones that will be closest to what you'll want is
> in /usr/lib/interchange/code/SystemTag.
> 
> Once you write the user tag, copy it to
> /usr/lib/interchange/code/UserTag, add it to the requires line in the
> catalog.cfg and restart Interchange.  There's more in the documentation
> on UserTags.

This seems to require me to write a tag for each method I want from
Date::Calc or a wrapper for the entire module, both seem like poor
solutions.

I'm already using $Tag->time and $Tag->convert_date and they work fine
for most things, however I am doing some reports on shipment volumes
and delivery performance so I need some more sophisticated date
manipulation and comparison routines.

I should have phrased the question like this:

Where do I add "use Date::Calc qw( Days_in_Year Days_in_Month ...);"
to allow these methods to be used in any perl code on the IC server?

Jeff


More information about the interchange-users mailing list