You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Jan Kyncl <ky...@pcv.cz> on 2002/03/14 11:53:20 UTC

Possible bugs or my misunderstanding

Hi all,

I just installed new Embperl 2.0b6. Great work !!! Thanks anyway Gerald

There are some of my observations /maybe possible bugs or my
misunderstanding/
1)
Using embperl:syntax with other than ISO 8859-1 /like czech etc/ characters
doesn't work.
The result is in ISO 8859-1  only.
<test type='text for example 8859-2  ..................'>
So in previous version 2.0b5 It worked perfectly.

2)
Using embperl:syntax  like this

<test type='[+ $somevariable +]'>
causes this result
test syntax XML::Embperl::DOM::Attr::iValue (2,12)

So I recognize that probably correct using of this should be
<test type='$somevariable'>
 Is that correct ?

3)Using standard mail tag
<mail:send to="name@someaddress" subject="Testmail">
causes this internal server error:

[2809]ERR: 32: Warning in Perl code: Bareword found where operator expected
at /home/www/tester/embperl2/mail.html line 5, near ")
    #line 5 "/home/www/tester/embperl2/mail.html"
    _ep_rp"

[2809]ERR: 32: Warning in Perl code: (Missing operator before _ep_rp?)

[2809]ERR: 24: Error in Perl code: syntax error at
/home/www/tester/embperl2/mail.html line 5, near ")
    #line 5 "/home/www/tester/embperl2/mail.html"
    _ep_rp"
     (in cleanup) BEGIN not safe after errors--compilation aborted at
/home/www/tester/embperl2/mail.html line 8.

Apache/1.3.14 (Unix) (Red-Hat/Linux) Embperl/2.0b6 mod_perl/1.25 Embperl
2.0b6 [Thu Mar 14 23:30:30 2002]

BTW: New emperl feature form validation is just amazing :-)))

S pozdravem / best regards

                           Jan Kyncl
              Prvni ceska virtualni Ltd.


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


Re: Fix for mail:send (was: Possible bugs or my misunderstanding)

Posted by Gerald Richter <ri...@ecos.de>.
>
> 3)Using standard mail tag
> <mail:send to="name@someaddress" subject="Testmail">
> causes this internal server error:
>

Here comes the fix. You need to copy the first file to Embperl/Mail.pm and
the second to Embperl/Syntax/Mail.pm, afterwards it should work

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
-------------------------------------------------------------


Re: Possible bugs or my misunderstanding

Posted by Gerald Richter <ri...@ecos.de>.
> 1)
> So the problem is that I have globally set
> PerlSetEnv      EMBPERL_ESCMODE 0
> in httd.conf but it probably doesn't work

b6 uses native Apache configuration directives, so either say

EMBPERL_ESCMODE 0

(without the PerlSetEnv) or turn scanning environment variables on with

Embperl_UseEnv on

(the first one is the prefered way, the second only there for backwards
compatibility)

>
>   $self->AddTagInside('test', ['type'], undef, undef, {
>                 perlcode => q[{
>                                 _ep_rp(%$x%, "this is value of the type
> %&type%");
>                 }]
>   });
>

The %&type% will generate Perl code to retrieve the value for the text
attribute, since you put it inside a string it simple will be displayed.
Here is the correct solution:


   $self->AddTagInside('test', ['type'], undef, undef, {
                 perlcode => q[{
                                 _ep_rp(%$x%, 'this is value of the type' .
%&'type%");
                 }]
   });

The single quote between & and type tells the Embperl compiler that the
result is a string and need to be quoted

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


Re: Possible bugs or my misunderstanding

Posted by Jan Kyncl <ky...@pcv.cz>.
Hi Gerald and All,

as the first I have to apologize for the false alert with other character
sets
1)
So the problem is that I have globally set
PerlSetEnv      EMBPERL_ESCMODE 0
in httd.conf but it probably doesn't work
so adding $escmode=0; to the code solved the problem with Czech and other
int. characters.

2)
> <test type='[+ $some +]'>
> causes this result
> test syntax XML::Embperl::DOM::Attr::iValue (2,12)
There is a example of my test syntax, It is almost same as your testname
syntax
(I'm just learning and testing the syntax feature:-)

package Embperl::Syntax::Test;

use strict;
use Embperl::Syntax qw{:types} ;
use Embperl::Syntax::HTML ;
use base qw(Embperl::Syntax::HTML);

sub new
    {
    my $class = shift;
    my $self = Embperl::Syntax::HTML::new($class);

    if (!$self->{-testInit})
        {
        $self->{-testInit} = 1;
        init($self);
        }
    return $self;
    }

sub init {
  my $self = shift;

  $self->AddTagInside('test', ['type'], undef, undef, {
                perlcode => q[{
                                _ep_rp(%$x%, "this is value of the type
%&type%");
                }]
  });

}


1;


            Thanks
                        Jan












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


Re: Possible bugs or my misunderstanding

Posted by Gerald Richter <ri...@ecos.de>.
> Is it allowed to run together b5 and b6 on different virtual servers ?
> I mean together on system, not on virtual servers.
> That is probably the main source of my troubles.
>

Since b5 has the namespace HTML::Embperl and b6 only Embperl is should work,
but be aware that this will not work in the future because all following
version will have the namespace Embperl

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


Re: Possible bugs or my misunderstanding

Posted by Jan Kyncl <ky...@pcv.cz>.
Hi Gerald and all,

little question before I will send "my bugs"...

Is it allowed to run together b5 and b6 on different virtual servers ? 
I mean together on system, not on virtual servers.
That is probably the main source of my troubles.

Thanks

            Jan




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


Re: Possible bugs or my misunderstanding

Posted by Gerald Richter <ri...@ecos.de>.
Hi,
>
> There are some of my observations /maybe possible bugs or my
> misunderstanding/
> 1)
> Using embperl:syntax with other than ISO 8859-1 /like czech etc/
characters
> doesn't work.
> The result is in ISO 8859-1  only.
> <test type='text for example 8859-2  ..................'>
> So in previous version 2.0b5 It worked perfectly.
>

There are no changes in this area between b5 and b6. Have you a small
example page/syntax that shows what is happeing.

> 2)
> Using embperl:syntax  like this
>
> <test type='[+ $somevariable +]'>
> causes this result
> test syntax XML::Embperl::DOM::Attr::iValue (2,12)
>

That's correct. It the call fetchs the value of the type attribute. I guess
your syntax has to be slightly changed. Could you send me your syntax
definition?


> So I recognize that probably correct using of this should be
> <test type='$somevariable'>
>  Is that correct ?
>

No, the first one is correct. (Of course you could create a syntax, where
this would correct, but not when you use standart EMbperlBlocks syntax)

> 3)Using standard mail tag
> <mail:send to="name@someaddress" subject="Testmail">
> causes this internal server error:
>
> [2809]ERR: 32: Warning in Perl code: Bareword found where operator
expected
> at /home/www/tester/embperl2/mail.html line 5, near ")
>     #line 5 "/home/www/tester/embperl2/mail.html"
>     _ep_rp"
>

This looks like a bug. I take a look at it later and let you know what's
wrong

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