perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kee Hinckley <>
Subject Implicit import of *
Date Fri, 22 Aug 2003 20:26:54 GMT
I was rather startled when I tried to do this in my EmbperlObject template.

             if ($serviceitem->{status} eq 'CLOSED') {
                     ($ENV{HTTPS} ? 'https' : 'http') . 
             } elsif ($serviceitem->{status} eq '') {
                 $rval = Execute({ inputfile => 'purchase.html', 
errors => \@errors, options => HTML::Embperl::optReturnError, import 
=> 0});
             } else {
                 $rval = Execute({ inputfile => '*', errors => 
\@errors, options => HTML::Embperl::optReturnError, import => 0});

After that I call
which is a method implemented in both '*' and 'purchase.html'.
However if the second if condition executes, it doesn't call the 
method in purchase.html, it calls the one in *.  In fact, I 
discovered that the code continues to work even if I don't Execute *. 
EmbperlObject is doing an implicit import of *.

1. If all I want to do is import the file, what should I do?  Not 
call Execute? What if there's an error while importing, where would I 
trap it?
2. How do I force the methods in purchase.html to get called and the 
ones in * to be ignored?
Kee Hinckley          Anti-Spam Service for your POP Account   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:
For additional commands, e-mail:

View raw message