Skip to content
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

Re: [PATCH perl5.004_67] Add Errno in ext/ #637

Closed
p5pRT opened this issue Sep 20, 1999 · 4 comments
Closed

Re: [PATCH perl5.004_67] Add Errno in ext/ #637

p5pRT opened this issue Sep 20, 1999 · 4 comments

Comments

@p5pRT
Copy link

p5pRT commented Sep 20, 1999

Migrated from rt.perl.org#1503 (status was 'resolved')

Searchable as RT1503$

@p5pRT
Copy link
Author

p5pRT commented Sep 20, 1999

From The RT System itself

A better fix is to avoid reentering it in the first place, by checking
for curcop == &compiling. Which is what I have done to the version of
your patch that has entered the repository.

For some obscure reasons I did test the %! auto-require stuff yesterday
and found that it doesn't work (in Perl 5.005_03 and 5.005_61). Well
actually it does work at runtime, just not at compile-time, exactly as the
comments indicate. But isn't this quite confusing​:

  print "$_\n" foreach keys %{'!'};

works (loads Errno.pm), but

  print "$_\n" foreach keys(%!);

doesn't. I would think this should either always work or it should be
disabled altogether. Or is this just waiting for the reentrant lexer,
which is just around the corner? :-)

BTW, I did send a perlbug report about this yesterday, but it hasn't
appeared on p5p at all. Maybe the perlbugtron is offline?

-Jan

-----------------------------------8<-----------------------------------
Change 1173 by gsar@​aatma on 1998/06/21 06​:51​:38

applied patch, modified logic to avoid reentering lexer at compile-time
Message-ID​: <19980619113104.S9711@​asic.sc.ti.com>
Date​: Fri, 19 Jun 1998 11​:31​:04 -0500
From​: Graham Barr <gbarr@​ti.com>
Subject​: Re​: [PATCH perl5.004_67] Add Errno in ext/

[snip]

==== //depot/perl/gv.c#28 (text) ====
Index​: perl/gv.c
--- perl/gv.c.1 Sun Jun 21 21​:30​:19 1998
+++ perl/gv.c Sun Jun 21 21​:30​:19 1998
@​@​ -711,9 +711,9 @​@​
goto magicalize;

case '\!'&#8203;:

- if(len > 1)
+ if (len > 1)
break;
- if(sv_type > SVt_PV) {
+ if (sv_type > SVt_PV && curcop != &compiling) {
HV* stash = gv_stashpvn("Errno",5,FALSE);
if(!stash || !(gv_fetchmethod(stash, "TIEHASH"))) {
dSP;

@p5pRT
Copy link
Author

p5pRT commented Jul 13, 2005

From @schwern

[RT_System - Mon Sep 20 05​:51​:22 1999]​:

For some obscure reasons I did test the %! auto-require stuff yesterday
and found that it doesn't work (in Perl 5.005_03 and 5.005_61). Well
actually it does work at runtime, just not at compile-time, exactly as the
comments indicate. But isn't this quite confusing​:

print "$\_\\n" foreach keys %\{'\!'\};

works (loads Errno.pm), but

print "$\_\\n" foreach keys\(%\!\);

doesn't.

This appears to be resolved in 5.8.6 and probably earlier.

@p5pRT
Copy link
Author

p5pRT commented Jul 13, 2005

The RT System itself - Status changed from 'stalled' to 'open'

@p5pRT p5pRT closed this as completed Jul 13, 2005
@p5pRT
Copy link
Author

p5pRT commented Jul 13, 2005

@schwern - Status changed from 'open' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant