perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kee Hinckley <naz...@somewhere.com>
Subject Re: importing subroutines with Execute()
Date Fri, 24 Jan 2003 01:33:57 GMT
You're right.  It's all kind of ugly.  And beware of virtual-hosts 
where the process is shared -- make sure your site-relative libraries 
either have different names, or are always the same version.

I do one of two things.

For libraries that are really perl libraries, I have the following at 
the head of every file.

[! use lib "$ENV{DOCUMENT_ROOT}/path-to-library"; !]
and also
[$ var $this $]
[- $this = shift -]

Then I can include them to my hearts content.

For libraries that have HTML code--so they really are embperl files, 
I usually do this

[- Execute({ isa => 'SiteInit.html' }); -]

Note that if you are using HTML::EmbperlObject you can put that in 
the template file, which is handy.  Then you can access the routines 
in that using

$this->routinename


I wish more of that were transparent.  Haven't looked to see what's 
happening in Embperl 2
-- 
Kee Hinckley
http://www.puremessaging.com/        Junk-Free Email
http://commons.somewhere.com/buzz/   Writings on Technology and Society

I'm not sure which upsets me more: that people are so unwilling to accept
responsibility for their own actions, or that they are so eager to regulate
everyone else's.

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Mime
View raw message