[packages/perl-JE] Up to 0.066
arekm
arekm at pld-linux.org
Thu Nov 19 11:46:15 CET 2026
commit 1f94dc033a85f08ad04d07ffab7fa1869963c9f6
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Thu Nov 19 00:41:36 2026 +0100
Up to 0.066
perl-JE-goto-into-construct.patch | 54 +++++++++++++++++++++++++++++++++++++++
perl-JE.spec | 9 ++++---
2 files changed, 59 insertions(+), 4 deletions(-)
---
diff --git a/perl-JE.spec b/perl-JE.spec
index 43a5d7e..571858b 100644
--- a/perl-JE.spec
+++ b/perl-JE.spec
@@ -5,18 +5,18 @@
%define pdir JE
Summary: JE - Pure-Perl ECMAScript (JavaScript) Engine
Name: perl-JE
-Version: 0.058
-Release: 2
+Version: 0.066
+Release: 1
# same as perl
License: GPL v1+ or Artistic
Group: Development/Languages/Perl
Source0: http://www.cpan.org/modules/by-module/JE/%{pdir}-%{version}.tar.gz
-# Source0-md5: 2e78436792d8c7b07e83b738cbd76173
+# Source0-md5: 63ed03bd82fbae5021a7f3f200c18799
+Patch0: %{name}-goto-into-construct.patch
URL: http://search.cpan.org/dist/JE/
BuildRequires: perl-devel >= 1:5.8.0
BuildRequires: rpm-perlprov >= 4.1-13
%if %{with tests}
-BuildRequires: perl-Tie-RefHash-Weak
BuildRequires: perl-TimeDate
%endif
BuildArch: noarch
@@ -28,6 +28,7 @@ pure-Perl JavaScript engine.
%prep
%setup -q -n %{pdir}-%{version}
+%patch -P0 -p1
%build
%{__perl} Makefile.PL \
diff --git a/perl-JE-goto-into-construct.patch b/perl-JE-goto-into-construct.patch
new file mode 100644
index 0000000..a7d6e42
--- /dev/null
+++ b/perl-JE-goto-into-construct.patch
@@ -0,0 +1,54 @@
+# perl >= 5.42 removed goto into a construct; labelled loops died in JE::Code::eval
+--- JE-0.066.orig/lib/JE/Code.pm
++++ JE-0.066/lib/JE/Code.pm
+@@ -317,25 +317,24 @@
+ if ($$stm[-1][1] =~ /^(?:do|while|for|switch)\z/) {
+ $stm = $$stm[-1];
+ $type = $$stm[1];
+- no warnings 'deprecated';
+- goto LOOPS; # skip unnecessary if statements
+ }
+-
+- BREAK: {
+- my $returned = $$stm[-1]->eval;
+- defined $returned and $return = $returned
+- }
+-
+- # Note that this has 'defined' in it, whereas the similar
+- # 'if' statement further down where the loop constructs are
+- # doesn't. This is because 'break' without a label sets
+- # $_label to '' and exits loops and switches.
+- if(! defined $_label || first {$_ eq $_label} @labels) {
+- undef $_label;
+- return;
+- } else {
+- no warnings 'exiting';
+- last BREAK;
++ else {
++ BREAK: {
++ my $returned = $$stm[-1]->eval;
++ defined $returned and $return = $returned
++ }
++
++ # Note that this has 'defined' in it, whereas the similar
++ # 'if' statement further down where the loop constructs are
++ # doesn't. This is because 'break' without a label sets
++ # $_label to '' and exits loops and switches.
++ if(! defined $_label || first {$_ eq $_label} @labels) {
++ undef $_label;
++ return;
++ } else {
++ no warnings 'exiting';
++ last BREAK;
++ }
+ }
+ }
+
+@@ -392,7 +391,6 @@
+
+ no warnings 'exiting';
+
+- LOOPS:
+ my $returned;
+
+ BREAK: {
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/perl-JE.git/commitdiff/1f94dc033a85f08ad04d07ffab7fa1869963c9f6
More information about the pld-cvs-commit
mailing list