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

[perl #82484] Some PerlIO layers can't be stacked during open

From:
Father Chrysostomos via RT
Date:
December 29, 2011 05:56
Subject:
[perl #82484] Some PerlIO layers can't be stacked during open
Message ID:
rt-3.6.HEAD-14510-1325166978-222.82484-15-0@perl.org
On Mon Dec 19 16:09:28 2011, LeonT wrote:
> On Thu, Jan 20, 2011 at 10:49 PM, Leon Timmermans <fawaka@gmail.com>
wrote:
> > The problem behind this can be summarized to this: �during open() a
> > PerlIO layer that defines an Open method can not be pushed on top of
> > another layer that doesn't define Open�. There are two possible
> > workarounds for this:
> >
> > a) Implement Open in all layers that don't implement it now.
> > b) Change the lookup mechanism in all existing Open methods.
> >
> > I decided to implement option a, because it seem to be the least
> > intrusive way to tackle this problem. In the first patch, I introduce
> > PerlIOBase_open, a generic open method that does what 90%+ of all
> > modules want it to do (open the layer beneath it, and then push the
> > current layer on top of it). It also updates the documentation to
> > advise people to use it.
> >
> > The second patch used this to fix this bug (#82484). The third patch
> > fixes #80764 using the same Open method (consider my previous patch
> > for that bug retracted in favor of this one). These two patches are
> > quite trivial :-).
> >
> > Leon
> 
> It seems my patch missed something important: it didn't export the
> PerlIOBase_open(). Missed it since they're exported weirdly.
> 
> Leon

Thank you.  Applied as 3dfd1b5cd2.


-- 

Father Chrysostomos


---
via perlbug:  queue: perl5 status: resolved
https://rt.perl.org:443/rt3/Ticket/Display.html?id=82484



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