[ic] Newbie: constructing Perl subroutines that use CPAN and other external modules

Jeff Boes jeff at endpoint.com
Sat Jul 9 10:08:00 EDT 2005

Can someone point me to examples of constructing Perl functions (either
global subs, catalog subs, whatever) which make use of CPAN or other
external modules? For example, I'm trying to use Date::Manip:

sub foo {

I have a "require Date::Manip" directive in my interchange.cfg file, I
have a "use Date::Manip;" inside the function body. The function gets
called at the appropriate time, and I get this error:

>Safe: Can't locate object method "new" via package "IO::File" (perhaps you forgot to load "IO::File"?) at /usr/local/lib/perl5/site_perl/5.8.3/Date/Manip.pm line 5345.

I added a "require IO::File" directive, and a "use IO::File;" to the
function, but without success. When an external module is loaded at
configuration time, is there some restriction on what additional
external modules it can use?

More information about the interchange-users mailing list