Mailing List Archive

svn commit: r1383016 - in /perl/embperl/trunk: Changes.pod Embperl/Form/Validate.pm Embperl/Syntax/Mail.pm README test/cmp/epoerrdoc.htm test/cmp/includeerr2.htm514 test/cmp/includeerr3.htm test/html/mail.htm
Author: richter
Date: Mon Sep 10 18:09:28 2012
New Revision: 1383016

URL: http://svn.apache.org/viewvc?rev=1383016&view=rev
Log:

- Adapations of tests for legency Perl's
- Error logging of Embperl::Syntax::Mail


Modified:
perl/embperl/trunk/Changes.pod
perl/embperl/trunk/Embperl/Form/Validate.pm
perl/embperl/trunk/Embperl/Syntax/Mail.pm
perl/embperl/trunk/README
perl/embperl/trunk/test/cmp/epoerrdoc.htm
perl/embperl/trunk/test/cmp/includeerr2.htm514
perl/embperl/trunk/test/cmp/includeerr3.htm
perl/embperl/trunk/test/html/mail.htm

Modified: perl/embperl/trunk/Changes.pod
URL: http://svn.apache.org/viewvc/perl/embperl/trunk/Changes.pod?rev=1383016&r1=1383015&r2=1383016&view=diff
==============================================================================
--- perl/embperl/trunk/Changes.pod (original)
+++ perl/embperl/trunk/Changes.pod Mon Sep 10 18:09:28 2012
@@ -37,7 +37,7 @@
providing uptodate information about the patches
and adaptions for Embperl 2.5.
- Applied further spell corrections from Florian Schlichting.
-
+ - Log Errors form Embperl::Syntax::Mail to error log

=head 2.4.0 4. Oct 2010


Modified: perl/embperl/trunk/Embperl/Form/Validate.pm
URL: http://svn.apache.org/viewvc/perl/embperl/trunk/Embperl/Form/Validate.pm?rev=1383016&r1=1383015&r2=1383016&view=diff
==============================================================================
--- perl/embperl/trunk/Embperl/Form/Validate.pm (original)
+++ perl/embperl/trunk/Embperl/Form/Validate.pm Mon Sep 10 18:09:28 2012
@@ -19,11 +19,16 @@
package Embperl::Form::Validate;

use strict;
-use vars qw($VERSION);
+use vars qw($VERSION $has_encode);
+
+BEGIN
+ {
+ eval "require Encode" ;
+ $has_encode = $@?0:1 ;
+ }

-use Encode ;

-$VERSION = '2.0.0' ;
+$VERSION = '2.5.0' ;

=head1 NAME

@@ -400,7 +405,8 @@ sub build_message
$id = $param -> [0] ;
$param -> [0] = $name ;
my @param ;
- if ($charset)
+ eval "require Encode" ;
+ if ($charset && $has_encode)
{
@param = map { Encode::encode($charset, $_) } @$param ;
}

Modified: perl/embperl/trunk/Embperl/Syntax/Mail.pm
URL: http://svn.apache.org/viewvc/perl/embperl/trunk/Embperl/Syntax/Mail.pm?rev=1383016&r1=1383015&r2=1383016&view=diff
==============================================================================
--- perl/embperl/trunk/Embperl/Syntax/Mail.pm (original)
+++ perl/embperl/trunk/Embperl/Syntax/Mail.pm Mon Sep 10 18:09:28 2012
@@ -86,10 +86,12 @@ sub Init
use Embperl::Mail ;

my $txt = XML::Embperl::DOM::Node::iChildsText (%$n%) ;
+ my @errors ;
$? = Embperl::Mail::Execute (
{
'input' => \$txt,
'inputfile' => 'mail',
+ 'errors' => \@errors,
'syntax' => 'Text',
'from' => %&'from%,
'to' => %&'to%,
@@ -102,6 +104,7 @@ sub Init
'maildebug' => %&'maildebug%,
'mailheaders' => [ (( %&'content-type% ) ? ('Content-Type: '.%&'content-type%) : ()) ],
}) ;
+ print STDERR join ('; ', @errors) if (@errors) ;
}
},
stackname => 'mail_send',

Modified: perl/embperl/trunk/README
URL: http://svn.apache.org/viewvc/perl/embperl/trunk/README?rev=1383016&r1=1383015&r2=1383016&view=diff
==============================================================================
--- perl/embperl/trunk/README (original)
+++ perl/embperl/trunk/README Mon Sep 10 18:09:28 2012
@@ -141,7 +141,6 @@ I have tested Embperl successfully

on Linux 2.x with

-perl5.004_04
perl5.005_01/02/03
perl5.6.1
perl5.8.x

Modified: perl/embperl/trunk/test/cmp/epoerrdoc.htm
URL: http://svn.apache.org/viewvc/perl/embperl/trunk/test/cmp/epoerrdoc.htm?rev=1383016&r1=1383015&r2=1383016&view=diff
==============================================================================
--- perl/embperl/trunk/test/cmp/epoerrdoc.htm (original)
+++ perl/embperl/trunk/test/cmp/epoerrdoc.htm Mon Sep 10 18:09:28 2012
@@ -14,8 +14,8 @@ next:
^There are (1|2) errormessages:

<table border=1>
-^- <tr><td>\[\d+\]ERR: 32: Warning in Perl code: Use of uninitialized value.+at .+epoerrdoc.htm line 6.</td></tr>
-^ <tr><td>\[\d+\]ERR: 24: Error in Perl code: Can't locate object method &quot;is&quot; via package &quot;here&quot;.+at .+epoerrdoc.htm line 6.</td></tr>
+^- <tr><td>\[\d+\]ERR: 32: Warning in Perl code: Use of uninitialized value.+at .+epoerrdoc.htm line 6.+</td></tr>
+^ <tr><td>\[\d+\]ERR: 24: Error in Perl code: Can't locate object method &quot;is&quot; via package &quot;here&quot;.+at .+epoerrdoc.htm line 6.+</td></tr>
</table>

</body>

Modified: perl/embperl/trunk/test/cmp/includeerr2.htm514
URL: http://svn.apache.org/viewvc/perl/embperl/trunk/test/cmp/includeerr2.htm514?rev=1383016&r1=1383015&r2=1383016&view=diff
==============================================================================
--- perl/embperl/trunk/test/cmp/includeerr2.htm514 (original)
+++ perl/embperl/trunk/test/cmp/includeerr2.htm514 Mon Sep 10 18:09:28 2012
@@ -5,67 +5,67 @@ The server encountered an internal error
<table cellspacing='2' cellpadding='5'>
<tr bgcolor='#eeeeee'><td>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-^\[\d+\]ERR: 32: Warning in Perl code: Use of uninitialized value \$Embperl::__\d+::param\[0\] in concatenation \(\.\) or string at /usr/msrc/embperl/test/html/incsub.htm line 6.
+^\[\d+\]ERR: 32: Warning in Perl code: Use of uninitialized value \$Embperl::__\d+::param\[0\] in concatenation \(\.\) or string at .+incsub.htm line 6.
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
</td></tr>
<tr bgcolor='#eeeeee'><td>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-^\[\d+\]ERR: 32: Warning in Perl code: Use of uninitialized value \$Embperl::__\d+::param\[0\] in concatenation \(\.\) or string at /usr/msrc/embperl/test/html/incsub.htm line 6.
+^\[\d+\]ERR: 32: Warning in Perl code: Use of uninitialized value \$Embperl::__\d+::param\[0\] in concatenation \(\.\) or string at .+incsub.htm line 6.
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
</td></tr>
<tr bgcolor='#eeeeee'><td>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-^\[\d+\]ERR: 32: Warning in Perl code: Use of uninitialized value \$Embperl::__\d+::param\[0\] in concatenation \(\.\) or string at /usr/msrc/embperl/test/html/incsub.htm line 6.
+^\[\d+\]ERR: 32: Warning in Perl code: Use of uninitialized value \$Embperl::__\d+::param\[0\] in concatenation \(\.\) or string at .+incsub.htm line 6.
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
</td></tr>
<tr bgcolor='#eeeeee'><td>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-^\[\d+\]ERR: 32: Warning in Perl code: Use of uninitialized value \$Embperl::__\d+::param\[0\] in concatenation \(\.\) or string at /usr/msrc/embperl/test/html/incsub.htm line 6.
+^\[\d+\]ERR: 32: Warning in Perl code: Use of uninitialized value \$Embperl::__\d+::param\[0\] in concatenation \(\.\) or string at .+incsub.htm line 6.
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
</td></tr>
<tr bgcolor='#eeeeee'><td>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-^\[\d+\]ERR: 24: Error in Perl code: Can't locate object method &quot;is&quot; via package &quot;here&quot; \(perhaps you forgot to load &quot;here&quot;\?\) at /usr/msrc/embperl/test/html/incerr.htm line 6.
+^\[\d+\]ERR: 24: Error in Perl code: Can't locate object method &quot;is&quot; via package &quot;here&quot; \(perhaps you forgot to load &quot;here&quot;\?\) at .+incerr.htm line 6.
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
</td></tr>
<tr bgcolor='#eeeeee'><td>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-^\[\d+\]ERR: 32: Warning in Perl code: Unquoted string &quot;table&quot; may clash with future reserved word at /usr/msrc/embperl/test/html/incerr.htm line 6.
+^\[\d+\]ERR: 32: Warning in Perl code: Unquoted string &quot;table&quot; may clash with future reserved word at .+incerr.htm line 6.
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
</td></tr>
<tr bgcolor='#eeeeee'><td>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-^\[\d+\]ERR: 32: Warning in Perl code: Unquoted string &quot;td&quot; may clash with future reserved word at /usr/msrc/embperl/test/html/incerr.htm line 8.
+^\[\d+\]ERR: 32: Warning in Perl code: Unquoted string &quot;td&quot; may clash with future reserved word at .+incerr.htm line 8.
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
</td></tr>
<tr bgcolor='#eeeeee'><td>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-^\[\d+\]ERR: 32: Warning in Perl code: Having no space between pattern and following word is deprecated at /usr/msrc/embperl/test/html/incerr.htm line 11.
+^\[\d+\]ERR: 32: Warning in Perl code: Having no space between pattern and following word is deprecated at .+incerr.htm line 11.
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
</td></tr>
^<tr bgcolor='#eeeeee'><td>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-^\[\d+\]ERR: 24: Error in Perl code: Transliteration replacement not terminated at /usr/msrc/embperl/test/html/incerr.htm line 12.
+^\[\d+\]ERR: 24: Error in Perl code: Transliteration replacement not terminated at .+incerr.htm line 12.
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
</td></tr>
<tr bgcolor='#eeeeee'><td>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-^\[\d+\]ERR: 32: Warning in Perl code: Unquoted string &quot;table&quot; may clash with future reserved word at /usr/msrc/embperl/test/html/incerr.htm line 6.
+^\[\d+\]ERR: 32: Warning in Perl code: Unquoted string &quot;table&quot; may clash with future reserved word at .+incerr.htm line 6.
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
</td></tr>
<tr bgcolor='#eeeeee'><td>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-^\[\d+\]ERR: 32: Warning in Perl code: Unquoted string &quot;td&quot; may clash with future reserved word at /usr/msrc/embperl/test/html/incerr.htm line 8.
+^\[\d+\]ERR: 32: Warning in Perl code: Unquoted string &quot;td&quot; may clash with future reserved word at .+incerr.htm line 8.
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
</td></tr>
<tr bgcolor='#eeeeee'><td>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-^\[\d+\]ERR: 32: Warning in Perl code: Having no space between pattern and following word is deprecated at /usr/msrc/embperl/test/html/incerr.htm line 11.
+^\[\d+\]ERR: 32: Warning in Perl code: Having no space between pattern and following word is deprecated at .+incerr.htm line 11.
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
</td></tr>
^<tr bgcolor='#eeeeee'><td>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-^\[\d+\]ERR: 24: Error in Perl code: Transliteration replacement not terminated at /usr/msrc/embperl/test/html/incerr.htm line 12.
+^\[\d+\]ERR: 24: Error in Perl code: Transliteration replacement not terminated at .+incerr.htm line 12.
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
</td></tr>
</table>

Modified: perl/embperl/trunk/test/cmp/includeerr3.htm
URL: http://svn.apache.org/viewvc/perl/embperl/trunk/test/cmp/includeerr3.htm?rev=1383016&r1=1383015&r2=1383016&view=diff
==============================================================================
--- perl/embperl/trunk/test/cmp/includeerr3.htm (original)
+++ perl/embperl/trunk/test/cmp/includeerr3.htm Mon Sep 10 18:09:28 2012
@@ -8,7 +8,7 @@



-^\*\*\*errors: \[\d+\]ERR: 24: Error in Perl code: Can't locate object method &quot;is&quot; via package &quot;here&quot;.+at .+incerr.htm line 6.<br>
+^\*\*\*errors: \[\d+\]ERR: 24: Error in Perl code: Can't locate object method &quot;is&quot; via package &quot;here&quot;.+at .+incerr.htm line 6


***rc:0

Modified: perl/embperl/trunk/test/html/mail.htm
URL: http://svn.apache.org/viewvc/perl/embperl/trunk/test/html/mail.htm?rev=1383016&r1=1383015&r2=1383016&view=diff
==============================================================================
--- perl/embperl/trunk/test/html/mail.htm (original)
+++ perl/embperl/trunk/test/html/mail.htm Mon Sep 10 18:09:28 2012
@@ -14,7 +14,7 @@

<mail:send to="richter@ecos.de"
[$ if $fdat{Email} $] reply-to="[+ $fdat{Email} +]" [$endif$]
- subject="Testmail" mailhost="mail.i.ecos.de">
+ subject="Testmail">
Hi,
this is a test for a new mail tag
it is send at [+ scalar(localtime) +]



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