Re: Requireing a specific sub

2004-05-25 Thread Werner Otto
Hi there, I have created the module and called it SimpleModule.pm. Here is the code: #!/usr/bin/perl package TestModule; use DBI; use Exporter; our @ISA = qw(Exporter); our @EXPORT = qw(connect_db); our $VERSION = 1.0; use strict; sub connect_db { my $db="testdb"; my $host="server"; my $port=

Re: Requireing a specific sub

2004-05-25 Thread Jan Eden
Werner Otto wrote on 25.05.2004: >Im lost, could you give me an example, please... > Please cc the list... >On Tue, 25 May 2004 13:13:29 +0200, Jan Eden <[EMAIL PROTECTED]> wrote: > >>Hi Otto, >> >>Werner Otto wrote on 25.05.2004: >> >>>Hi there, >>> >>>Is there any way that I can call a specific

Re: Requireing a specific sub

2004-05-25 Thread Jan Eden
Hi Otto, Werner Otto wrote on 25.05.2004: >Hi there, > >Is there any way that I can call a specific sub from a cgi script. > >i.e. > >script1.cgi > >sub print1 >{ > print "hello1"; >} > >sub print2 >{ > print "hello2"; >} > >script2.cgi > >my messy code: >require("/home/user/public_html/scrip

Requireing a specific sub

2004-05-25 Thread Werner Otto
Hi there, Is there any way that I can call a specific sub from a cgi script. i.e. script1.cgi sub print1 { print "hello1"; } sub print2 { print "hello2"; } script2.cgi my messy code: require("/home/user/public_html/script1.cgi.script2()"); obviously this does not compile. But the results needed