New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Looking for pointer to aid for updating older perl code #1164
Comments
From lvirden@cas.orgCreated by lvirden@cas.orgThis is a bug report for perl from lvirden@cas.org, ----------------------------------------------------------------- Is there a change that all these scripts can make so that regardless of Perl Info
|
From @gsarOn Thu, 10 Feb 2000 09:23:09 EST, "Larry W. Virden" wrote:
Nope, you wouldn't have to change a thing. Looks like a bug to me. Sarathy |
From @gsarOn Thu, 10 Feb 2000 09:23:09 EST, "Larry W. Virden" wrote:
Here's a fix. Sarathy Inline Patch-----------------------------------8<-----------------------------------
Change 5061 by gsar@auger on 2000/02/10 19:17:09
longstanding bug in parsing "require VERSION", could reallocate
current line and not know it; exposed by change#5004; manifested
as parse failure of C<{require 5.003}>
Affected files ...
... //depot/perl/t/comp/require.t#9 edit
... //depot/perl/t/comp/use.t#8 edit
... //depot/perl/toke.c#195 edit
Differences ...
==== //depot/perl/t/comp/require.t#9 (xtext) ====
Index: perl/t/comp/require.t
--- perl/t/comp/require.t.~1~ Thu Feb 10 11:17:15 2000
+++ perl/t/comp/require.t Thu Feb 10 11:17:15 2000
@@ -7,7 +7,7 @@
# don't make this lexical
$i = 1;
-print "1..16\n";
+print "1..20\n";
sub do_require {
%INC = ();
@@ -23,6 +23,24 @@
close REQ;
}
+eval {require 5.005};
+print "# $@\nnot " if $@;
+print "ok ",$i++,"\n";
+
+eval { require 5.005 };
+print "# $@\nnot " if $@;
+print "ok ",$i++,"\n";
+
+eval { require 5.005; };
+print "# $@\nnot " if $@;
+print "ok ",$i++,"\n";
+
+eval {
+ require 5.005
+};
+print "# $@\nnot " if $@;
+print "ok ",$i++,"\n";
+
# new style version numbers
eval { require v5.5.630; };
==== //depot/perl/t/comp/use.t#8 (xtext) ====
Index: perl/t/comp/use.t
--- perl/t/comp/use.t.~1~ Thu Feb 10 11:17:15 2000
+++ perl/t/comp/use.t Thu Feb 10 11:17:15 2000
@@ -5,9 +5,15 @@
unshift @INC, '../lib';
}
-print "1..14\n";
+print "1..15\n";
my $i = 1;
+eval "use 5.000"; # implicit semicolon
+if ($@) {
+ print STDERR $@,"\n";
+ print "not ";
+}
+print "ok ",$i++,"\n";
eval "use 5.000;";
if ($@) {
==== //depot/perl/toke.c#195 (text) ====
Index: perl/toke.c
--- perl/toke.c.~1~ Thu Feb 10 11:17:15 2000
+++ perl/toke.c Thu Feb 10 11:17:15 2000
@@ -825,7 +825,7 @@
if (*d == 'v')
d++;
for (; isDIGIT(*d) || *d == '_' || *d == '.'; d++);
- if ((*d == ';' || isSPACE(*d)) && *(skipspace(d)) != ',') {
+ if (*d == ';' || isSPACE(*d) || *d == '}' || !*d) {
s = scan_num(s);
/* real VERSION number -- GBARR */
version = yylval.opval;
End of Patch. |
Migrated from rt.perl.org#2131 (status was 'resolved')
Searchable as RT2131$
The text was updated successfully, but these errors were encountered: