You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by alan milligan <al...@hotmail.com> on 2001/09/09 05:49:18 UTC

EmbPerl and Inline

I am still working on this *** BUG ***, and it is quite a difficult one to 
crack.  I am trying very hard not to have to delve into the internals of 
either of these packages, so if I manage to jog anyone's memory to constrain 
my efforts, I will be very appreciative.

To reiterate the problem, I have a perl module in my Perl install tree that 
takes advantage of the Inline::C package to wrap some C code.  This works 
perfectly fine when I run a script using Perl.  Please note that I am not 
using Inline within either mod_perl, nor CGI, therefore all questions 
regarding _Inline, UNTAINT etc are irrelevant, as this module should be 
treated as any other fully native Perl module in the install tree!  The 
Embperl equivalent does not run under embpexec.pl however :-( ...

9171]ERR:  24: Line 1: Error in Perl code: Undefined subroutine 
&amp;Balclutha::User::Courier::_isValidPwd called at 
/usr/local/lib/perl5/site_perl/5.6.1/i686-linux/Balclutha/User/Courier.pm 
line 32.

I have cut my own version of the embperl.pl script with debug amongst other 
things.  The problem is exactly expressed in the fact that in the successful 
version, when one is in package Balclutha::User::Courier, @ISA is defined 
with Exporter and DynaLoader.  In the unsuccessful version, these are not 
defined.

Because DynaLoader is not present, it cannot have loaded the XS stub to the 
_isValidPwd function, and thus gives this entirely reasonable error under 
the circumstances.

Does anyone out there know why the use directive is not fully functional 
when embedded in a HTML::Embperl script ?????????????



_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


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


Re: EmbPerl and Inline

Posted by Gerald Richter <ri...@ecos.de>.
Hi,

> Does anyone out there know why the use directive is not fully functional
> when embedded in a HTML::Embperl script ?????????????

there are nothing special with use under Embperl. After rereading your
example, I see that you are mixing [! !] and [* *], this may be the problem,
because [* *] in 1.3.x are still experimental. Try either to use only [* *]:

[*
use Balclutha::User;
*]
    <body>
[*
my $user = Balclutha::User->login($fdat{u},$fdat{p});
if (defined $user) {
*]
User: [+ $user->name +] has groups [+ $user->groups +]<br>
[* } else { *]
Invalid User/Pwd<br>
[* } *]

or not [* *] at all:

[!
use Balclutha::User;
!]
    <body>
[-
$user = Balclutha::User->login($fdat{u},$fdat{p});
-]
[$ if (defined $user) $]
User: [+ $user->name +] has groups [+ $user->groups +]<br>
[$ else $]
Invalid User/Pwd<br>
[$ endif $]

Does this change anything ?

Gerald


-------------------------------------------------------------
Gerald Richter    ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:       Tulpenstrasse 5         D-55276 Dienheim b. Mainz
E-Mail:     richter@ecos.de         Voice:    +49 6133 925131
WWW:        http://www.ecos.de      Fax:      +49 6133 925152
-------------------------------------------------------------



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