I think that the problem is that using Perlrun, the main entry point for
your page is no longer called 'main'.  Hence, try to access
$main::HTMLTemplate is undefined.

An ugly fix may be to do the following when you create the HTML::Template
object:
$main::HTMLTemplate = new HTML::Template

Of course, a better a fix is just to pass in your object to the subroutine.

Brian

-----Original Message-----
From: Keith Jackson [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, January 28, 2003 5:06 PM
To: [EMAIL PROTECTED]
Subject: [htmltmpl] PerlRun and H::T


In the thread about mod-perl, the topic of PerlRun came up so I decided to
look into it for applications we have here. The first one I tried it sped it
up dramatically. (running siege with 10 concurrent users the average
response time of a sample page went from 7.5 sec to 1.08).

The second site I tried was an older site that used:

print "location: http:...... \n\n";

Using PerRun, it displayed "location: http:...." on the browser. 
Switching the code to say:

print $query->redirect("http:....") 

it worked fine.

The next site called created an HTML::Template instance in MAIN, then in a
subroutine defined in a 'require'd file did:

$main::HTMLTemplate->param(list => \@list);

This errored off with the message:
PerlRun: `Can't call method "param" on an undefined value at
CONTROLcontent/section.pm line 276.

Unfortunately the documentation is very thin.  Anyone have any helpful hints
or practical advice.

Thanks 


On Fri, 2003-01-24 at 13:23, Paulsen, Brian wrote:
>I would strongly recommend looking at the Apache::Perlrun module.  It 
>would give you significant performance increases while also maintaining 
>the current security of your non-mod-perl server.  Also, it should be 
>fairly easy within the Apache environment to define which parts of the 
>site are considered unsafe (i.e., old code) and which are safe (using 
>strict, etc.).
> 
>If, after looking at the Apache::Perlrun code, you still don't think 
>mod-perl is safe, I would be interested to hear why.  (Although, it 
>should probably be off-line)
 
>Brian
 



-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com _______________________________________________
Html-template-users mailing list [EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/html-template-users

------------------------------------------------------------------------------
This message is intended only for the personal and confidential use of the designated 
recipient(s) named above.  If you are not the intended recipient of this message you 
are hereby notified that any review, dissemination, distribution or copying of this 
message is strictly prohibited.  This communication is for information purposes only 
and should not be regarded as an offer to sell or as a solicitation of an offer to buy 
any financial product, an official confirmation of any transaction, or as an official 
statement of Lehman Brothers.  Email transmission cannot be guaranteed to be secure or 
error-free.  Therefore, we do not represent that this information is complete or 
accurate and it should not be relied upon as such.  All information is subject to 
change without notice.




-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
Html-template-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/html-template-users

Reply via email to