Apache::TieBucketBrigade

Perl extension which ties an IO::Handle to Apache's Bucket Brigade so you can use standard filehan...
Download

Apache::TieBucketBrigade Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Publisher Name:
  • Will Whittaker and Ken Simpson
  • Publisher web site:
  • http://search.cpan.org/~mock/

Apache::TieBucketBrigade Tags


Apache::TieBucketBrigade Description

Perl extension which ties an IO::Handle to Apache's Bucket Brigade so you can use standard filehandle type operations on the brigade Apache::TieBucketBrigade is a Perl module that has one usefull method "new_tie" which takes an Apache connection object and returns a tied IO::Handle object. It should be used inside a mod_perl protocol handler to make dealing with the bucket brigade bitz easier. FILENO will emulate a real fileno (using FILE::IO::new_tmpfile) and overrides CORE::select so that 4 arg select will work as expected (APR::Socket->poll underneath). IO::Handle::blocking will also work to set BLOCKING or NONBLOCKING, however autoflush is a noop. New to this version, closing the filehandle will actually close the connection. Note that several things here are a bit hackish, and there is the potential for resource problems since twice as many real file descriptors are used if FILENO is used then would otherwise be if I didn't have to fake it.This module requires mod_perl 1.99_18 or greater (so that support for APR::Socket->poll is included) otherwise it won't work.SYNOPSIS use Apache::Connection (); use Apache::Const -compile => 'OK'; use Apache::TieBucketBrigade; sub handler { my $FH = Apache::TieBucketBrigade->new_tie($c); my @stuff = ; print $FH "stuff goes out too"; $FH->print("it's and IO::Handle too!!!"); Apache::OK; } Requirements: · Perl


Apache::TieBucketBrigade Related Software