perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kee Hinckley <naz...@somewhere.com>
Subject eval and Execute and subs
Date Mon, 17 Mar 2003 17:26:47 GMT
HTML::EmbperlObject

$obj = Execute({ object => $file });
try {
	$obj->foo();
} otherwise {
	$this->Error(0);	# $this is the ref to this page object
	handle error
};

This doesn't work.  The page still returns with an error value, and 
my handler in the EmbperlObject template sees the error and handles 
it internally.

Here's my object template.

         my $rval = Execute({ inputfile => '*', errors => \@errors, 
options => HTML::Embperl::optReturnError}); 
if ($rval || @errors) {
             $this->Error(0);
             Execute("$ENV{DOCUMENT_ROOT}/error.html", $rval, @errors);
         }

What can I do to clear the error so that won't be executed?


On a slightly different topic.  { object => $file, isa => $otherfile 
} did not do what I expected.  I thought it would make $file a 
subclass of $otherfile, but  it does not seem to.  I had to do an 
Execute({ isa => $otherfile }) in each of the subroutines in $file.
-- 
Kee Hinckley
http://www.puremessaging.com/        Junk-Free Email Filtering
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