Gossamer Forum
Home : Products : Links 2.0 : Discussions :

Splitting site_html.pl into multiple files

Quote Reply
Splitting site_html.pl into multiple files
.

[This message has been edited by Trekker (edited October 28, 1999).]
Quote Reply
Re: Splitting site_html.pl into multiple files In reply to
hehehe..

isn't this just like TEMPLATES?

ok... hmm.. i'd say you'd have to make a subroutine like this:

sub load {
my ($sub, $info) = @_;
use Templates::$sub;
}

or something Wink

the files would need to be named *.pm though..

you could also try

sub load {
my ($sub, $info) = @_;
require "$sub.pl";
print &{\&{$sub}}($info);
}

that would be easier and you wouldn't have to package everything..

jerry
Quote Reply
Re: Splitting site_html.pl into multiple files In reply to
.

[This message has been edited by Trekker (edited October 28, 1999).]
Quote Reply
Re: Splitting site_html.pl into multiple files In reply to
 
Code:
require "/fullpath/to/site_html1.pl";
require "/fullpath/to/site_html2.pl";

IMHO, I think it would be more of a strain on your CPU of your server to search through many different html.pl files than to use site_html_template.pl.

It would be less trouble to switch to templates, which BTW are a lot easier to maintain over time.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------