CGI-WebOut
view release on metacpan or search on metacpan
1.02 Sat Apr 20 19:00:00 2002
- bug in NoCache() with fixed Last-modified (proxy dependent)
1.10 Fri May 24 18:00:00 2002
- added support for FCGI compatibility (partial)
2.00 Sat Aug 23 21:00:00 2003
- code rewritten by 80%
- now module is fully tie-safe (see comments inside and POD)
- fixed bug: now module works in Perl 5.8 too
- module is now fully transparent for caller code even if
it uses tie(*STDOUT)
- a number of comments is translated from Russian to English
- no AutoLoader in new version
- use strict
2.02 Thu 23 Oct 21:35:05 2003
- fixed memory leak under FastCGI
2.10 Wed Dec 31 22:00:00 2003
- Published to CPAN.
}
if ($Headers[$i]=~m/^location: /i) {
$Redirected = 1;
}
}
if (!$Redirected) {
push(@Headers, "Content-type: $ContType");
my $headers = join("\n",@Headers)."\n\n";
# Prepend the output buffer with headers data.
# So we output the buffer and headers in ONE print call (it is
# more transparent for calling code if it ties STDOUT by himself).
$$rRootBuf = $headers.$$rRootBuf;
} else {
# Only headers should be sent.
my $headers = join("\n",@Headers)."\n\n";
_RealPrint($headers);
}
$HeadersSent = 1;
}
# Îòïðàâèòü áóôåð è î÷èñòèòü åãî
_Debug("Flush: len=%d", length($$rRootBuf));
# E.g. the following code will not work if Flush() is uncommented:
# use CGI::WebOut;
# use CGI::Session;
# my $session = new CGI::Session(...);
# SetCookie(...); # says that "headers are already sent"
#CGI::WebOut::Flush();
$this->parentCall(sub { return fileno(*{$this->{handle}}) });
return 0;
}
# Untie process is fully transparent for parent. For example, code:
# tie(*STDOUT, "T1");
# eval "use CGI::WebOut"; #***
# print "OK!";
# untie(*STDOUT);
# generates EXACTLY the same sequence of call to T1 class, as this
# code without ***-marked line.
# Unfortunately we cannot retie CGI::WebOut::Tie back to the object
# in UNTIE() - when the sub finishes, Perl hardly remove tie.
our $doNotUntie = 0;
sub UNTIE
( run in 0.323 second using v1.01-cache-2.11-cpan-a1d94b6210f )