Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the CGI CPAN distribution.

Report information
The Basics
Id: 53628
Status: rejected
Priority: 0/
Queue: CGI

Owner: Nobody in particular
Requestors: MARKSTOS [...]
Cc: miyagawa [...]

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)

CC: miyagawa [...]
Subject: wish: consider refactoring 'read_from_stdin' to make it easier to swap out STDIN
Download (untitled) / with headers
text/plain 867b
Currently, 'CGI::read_from_stdin()' contains this code: if ( $MOD_PERL ) { $res = $self->r->read($tempbuf, $bufsiz, 0) } else { $res = read(\*STDIN, $tempbuf, $bufsiz); } ### Then CGI::PSGI came along and wanted to read from a source other than these two. So, it overloads 'read_from_stdin()' to essentially change one line: $res = $self->{psgi_env}{'psgi.input'}->read($tempbuf, $bufsiz, 0); But now we've found a bug in 'read_from_stdin()', so we have some changes to it in 'git' (currently just in Yanick's branch), Once released, CGI::PSGI will need to be patched as well (and any other module that takes the same approach). My proposal is to to make a routine that encapsulates the if/else logic above. Then, CGI::PSGI could override just that. Also, it's step towards further isolating mod_perl-specific logic in
Download (untitled) / with headers
text/plain 240b
This issue has been copied to: please take all future correspondence there. This ticket will remain open but please do not reply here. This ticket will be closed when the github issue is dealt with.
Download (untitled) / with headers
text/plain 579b
d8277a5 killed the read_from_stdin subroutine. The above behaviour can be found in the read_from_client subroutine: sub read_from_client { my($self, $buff, $len, $offset) = @_; local $^W=0; # prevent a warning return $MOD_PERL ? $self->r->read($$buff, $len, $offset) : read(\*STDIN, $$buff, $len, $offset); } So either this issue is no longer relevant, or the method has been simplified so much that i would suggest monkey patching it if you need it to do something different. Closing, please comment if this issue is still relevant.

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to