Andre Landwehr writes:
>On Sun, Oct 15, 2000 at 10:08:00AM -0500, John Aughey wrote:
>> in an epl file to include a common nav bar in many .epl files. I would
>> like to evaluate the navbar.epl script in the same namespace as the
>> calling script. I want to do this so the navbar.epl has access to some
>> variables that are defined in the parent script such as an authorization
>> string.
>
>you may look in the mailarchives, a similar question was asked
>less than two weeks ago
I only read the list once a week, and I wound up deleteing most of the
activity from last week, so I missed any discussion that took place.
We have a function called includeexec() that we use for exactly this:
sub includeexec($@)
{
my ($filename) = shift;
my @param = @_;
my $body = '';
my ($package, $file, $line) = caller();
{
no strict 'refs';
my $cleanfile = \%{"$package\:\:CLEANUPFILE"};
$cleanfile->{"_<$filename"} = 1;
}
HTML::Embperl::Execute({inputfile => $filename,
output => \$body,
param => \@param ,
package => $package,
escmode => 0,
cleanup => 0});
return $body;
}
The nested block uses the new CLEANUPFILE feature I wrote for Embperl,
so that variables defined in the included file will be cleaned up as
well.
Todd
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]