[ic] Cleaning up my code?

interchange-users@icdevgroup.org interchange-users@icdevgroup.org
Wed Sep 11 11:29:23 2002


On Wed, Sep 11, 2002 at 04:22:46PM +0100, marc.brevoort wrote:
> Hi group,
> 
> In the Interchange project that I'm working on, the pages that I'm working on 
> are starting to contain lots and lots of Perl code, to the point where 
> finding back a particular piece of code takes a lot of scrolling in the file.
> 
> I'd like to move some subroutines to external files. Unfortunately 'use' and 
> 'require' are disabled by default by IC's 'safe' mode. Also, a 'sub' defined
> in one perl block is out of scope to the next one. Thus, using the 'include' 
> tag does not seem to be very useful.

Make a catalog.pm module for that store and 'use' it in the ic startup.
Then you can call it from your tags.  You can also work unsafe, but
I'm assuming from the way you phrased this that's not what you want.

> 
> Does anyone have similar issues? What have you done about it?
> 
> Regards,
> 
> Marc Brevoort
> _______________________________________________
> interchange-users mailing list
> interchange-users@icdevgroup.org
> http://www.icdevgroup.org/mailman/listinfo/interchange-users
> 

-- 

Christopher F. Miller, Publisher                               cfm@maine.com
MaineStreet Communications, Inc           208 Portland Road, Gray, ME  04039
1.207.657.5078                                         http://www.maine.com/
Content/site management, online commerce, internet integration, Debian linux