errors handling in HTML::Embperl::Mail

2004-06-22 Thread Dan Manley
Hi,
I'm using embperl 1.3.6 on RedHat linux 9 with Apache 1.3.31 with 
mod_perl 1.29.  I'm encountering some strange behaviour with the mailing 
package.  I have an embperl file calling a method in a package I'm 
written.  This method does some work (processes a credit-card payment) 
and returns the results as a hash reference.  Then the .epl does a 
little more work and calls HTML::Embperl::Mail::Execute() to send a 
notice to the customer.

The strangeness I'm seeing is that the HTML::Embperl::Execute() called 
inside HTML::Embperl::Mail::Execute() successfully parses and rendered 
the email template but returns a non-empty errors array with a string 
identical to a warn debugging message issued in the credit card 
processing package.   If I comment out the warn statements in the 
package, the mailer works.  How is it that Embperl (in the C code?) has 
access to the warn message and uses it to claim an error message?

Dan
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


namespaces for imported embperl sub's

2004-06-22 Thread Dan Manley
Hi,
In a project I'm working on, I'd like to have some small and simple 
embperl subs located in a lib directory, in individual files (for the 
most part).  Consequently, I would like to be able to import all of 
these files in a single call, like with something like this:

Execute({ inputfile => $req->{embperl_common_lib} . "/all.epl", import 
=> 1, package => "SPOTNIK_COMMON" });

all.epl would have a bunch of epl's to import, like this:
[-
 my $req = shift;
 Execute( { inputfile => $req->{embperl_common_lib}.'/displaytime.epl', 
import => 1, package => "SPOTNIK_COMMON" } );
-]

But when I try to call a sub defined in displaytime.epl with the 
namespace of SPOTNIK_COMMON:: it says the sub doesn't exist.

Am I doing this the right way?  Is there something I'm missing or 
something I should be doing differently?

Dan
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]