I have no idea, really.  I'm not totally fluent in embperl / perl (yet :).

I've been doing something like this in my embperl scripts:

<html>

[-
        use strict;
        use MyPackage;
        use vars qw ($dbh $sth $etc $foo $baz);
        $dbh = dbConnect(); # dbConnect comes from MyPackage
-]

Some html text...

[-
        $sth = $dbh->prepare("some sql command");
        $sth->execute();
-]

[+ $sth->fetchrow_array +]

and it all seems to work... all I can suggest is to double check your perl
module.  I haven't done any Object Oriented stuff with perl like you are doing
there so I don't know if it is right or wrong.

On 19-Apr-2000 Steven D. Arnold wrote:
> Hi Wim,
> 
> At 10:36 AM 4/19/2000 -0700, you wrote:
>  > While I'm quite new to embperl (but using it daily), I think I've seen
> this.
>  > It seems like the [+ +] block isn't seeing the $mvar of the [- -] block.
> 
> Thanks for the pointer. I tried it out, but unfortunately it didn't fix it. 
> I even changed the code as follows:
> 
> <html>
> <head>
> <title>Some Plain tests for Embperl</title>
> </head>
> 
> <body>
> 
> [-
> use strict;
> use vars qw ($mvar);
> use foo;
> $mvar = foo->new();
> $mvar->print_value();
> -]
> [$ if ($mvar) $]
> [+ #$mvar->print_value() +]
> [$ else $]
> mvar undefined!
> [$ endif $]

Regards,

Wim Kerkhoff, Software Engineer
NetMaster Networking Solutions
[EMAIL PROTECTED]

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

Reply via email to