develooper Front page | perl.perl5.porters | Postings from December 2011

[perl #31422] can't write open() wrapper without affecting how the FH is parsed

Thread Previous | Thread Next
From:
Father Chrysostomos via RT
Date:
December 7, 2011 20:27
Subject:
[perl #31422] can't write open() wrapper without affecting how the FH is parsed
Message ID:
rt-3.6.HEAD-5084-1323318424-1334.31422-15-0@perl.org
On Wed Dec 07 18:16:22 2011, jkeenan wrote:
> On Wed Dec 07 11:32:14 2011, andrew@pimlott.net wrote:
> 
> > 
> > Wow, I have no idea why I filed that bug (in 2004) either!  Your
> > follow-up is admirable. :-)
> > 
> 
> Well, I'm trying to make sure everyone who takes the time to file a bug
> report gets a response from a human in, say, eight years or less. ;-)
> 
> I'll take this ticket and hold it open for seven days in case you want
> to file an updated report.  Otherwise, we'll close it in a week's time.

I may have misunderstood the original report, but in any case there is a
bug here.

I think this report should stay open until we figure out some way to let
perl subs override open() with the same syntax, or decide that we’re not
going to.

   open(<FH>, $file); # syntax error
   myopen(<FH>, $file); # silently the wrong thing

   sub foo;
   open(foo, $file); # calls foo()
   myopen(foo, $file); # same as myopen("foo"...)

   sub foo() { 0 }
   open(foo, $file); # open(0, $file);
   myopen(foo, $file); # same (inconsistent with example above)


-- 

Father Chrysostomos


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About