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
can't write open() wrapper without affecting how the FH is parsed #7487
Comments
From andrew@pimlott.netCreated by andrew@pimlott.netI tried to write a wrapper for open: sub myopen (*$$) { However, using it has unexpected and subtle side effects on how the opened myopen OUT, '>', 'out' or die $!; works fine. But sub FOO::bar { "hey\n" } gives Can't locate object method "OUT" via package "FOO", and with -w also Evidently, the parser has some heuristics for interpreting barewords, which print OUT FOO->bar; is parsed as print ((OUT FOO)->bar) (am I correct?), even if OUT isn't known to be a filehandle. I would think Andrew Perl Info
|
From @jkeenanOn Wed Sep 01 10:29:40 2004, andrew@pimlott.net wrote:
I believe the program attached, 31442.pl, reproduces your sample code. (Of course, when I try to run this under 'use strict;', I start to Thank you very much. |
The RT System itself - Status changed from 'new' to 'open' |
From @cpansproutOn Tue Dec 06 19:08:12 2011, jkeenan wrote:
This is one of my pet peeves. The (*) prototype isn’t anything like any More functional bareword prototype (*)
See autodie, which I consider broken for this very reason (among others).
-- Father Chrysostomos |
From andrew@pimlott.netExcerpts from James E Keenan via RT's message of Tue Dec 06 19:08:12 -0800 2011:
Wow, I have no idea why I filed that bug (in 2004) either! Your Andrew |
From @jkeenanOn Wed Dec 07 11:32:14 2011, andrew@pimlott.net wrote:
Well, I'm trying to make sure everyone who takes the time to file a bug I'll take this ticket and hold it open for seven days in case you want Thanks for your quick response. Jim Keenan |
From @cpansproutOn Wed Dec 07 18:16:22 2011, jkeenan wrote:
I may have misunderstood the original report, but in any case there is a I think this report should stay open until we figure out some way to let open(<FH>, $file); # syntax error sub foo; sub foo() { 0 } -- Father Chrysostomos |
Migrated from rt.perl.org#31422 (status was 'open')
Searchable as RT31422$
The text was updated successfully, but these errors were encountered: