<iw_perl> use something.pm;my $something= something->new();my $URL = $something->makeURL("somedomain.com");</iw_perl>{iw_value name='$URL'/}and in something.pm:package something;sub new { my $proto; ($proto) = @_; my $class = ref($proto) || $proto; my $this = {}; return bless $this, $class;}sub makeURL{ my ($this, $domain) = @_; my $URL= "http://".$domain; return $URL;}1;
use MyCompany::something;
package MyCompany::something;
Sure I use PMs for this all the time. Get the O'Reilly book on writing perl modulesHere is an example: <iw_perl> use something.pm;my $something= something->new();my $URL = $something->makeURL("somedomain.com");</iw_perl>{iw_value name='$URL'/}and in something.pm:package something;sub new { my $proto; ($proto) = @_; my $class = ref($proto) || $proto; my $this = {}; return bless $this, $class;}sub makeURL{ my ($this, $domain) = @_; my $URL= "http://".$domain; return $URL;}1;
Hi,Thanks for all your replies.I am able to create and install a perl module. The module is seen under C:\Perl\site\libHowever, when I try to use it in my tpl file, it fails to generate.Do I need to do any more configuration? Do I need to restart the interwoven server?Thanks and Regards,Rakesh.