Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

apr::perlio(1) [redhat man page]

PERLIO(1)						User Contributed Perl Documentation						 PERLIO(1)

NAME
APR:PerlIO -- An APR Perl IO layer SYNOPSIS
use APR::PerlIO (); sub handler { my $r = shift; open my $fh, ">:APR", $filename, $r or die $!; # work with $fh as normal $fh close $fh; return Apache::OK; } DESCRIPTION
"APR::PerlIO" implements a Perl IO layer using APR's file manipulation as its internals. Why do you want to use this? Normally you shouldn't, probably it won't be faster than Perl's default layer. It's only useful when you need to manipulate a filehandle opened at the APR side, while using Perl. Normally you won't call open() with APR layer attribute, but some mod_perl functions will return a filehandle which is internally hooked to APR. But you can use APR Perl IO directly if you want. METHODS
Perl Interface: open() To use APR Perl IO to open a file the four arguments open() should be used. For example: open my $fh, ">:APR", $filename, $r or die $!; where: the second argument is the mode to open the file, constructed from two sections separated by the ":" character: the first section is the mode to open the file under (>, <, etc) and the second section must be a string APR. the fourth argument can be a "Apache::RequestRec" or "Apache::ServerRec" object. the rest of the arguments are the same as described by the open() manpage. seek() seek($fh, $offset, $whence); If $offset is zero, "seek()" works normally. However if $offset is non-zero and Perl has been compiled with with large files support ("-Duselargefiles"), whereas APR wasn't, this function will croak. This is because largefile size "Off_t" simply cannot fit into a non-largefile size "apr_off_t". To solve the problem, rebuild Perl with "-Uuselargefiles". Currently there is no way to force APR to build with large files support. The C interface provides functions to convert between Perl IO and APR Perl IO filehandles. SEE ALSO
The perliol(1), perlapio(1) and perl(1) manpages. perl v5.8.0 2002-06-05 PERLIO(1)

Check Out this Related Man Page

install::TempContent::Objects::mod_perl-2.0.9::docs::apiUserRContribuinstall::TempContent::Objects::mod_perl-2.0.9::docs::api::APR::BucketAlloc(3)

NAME
APR::BucketAlloc - Perl API for Bucket Allocation Synopsis use APR::BucketAlloc (); $ba = APR::BucketAlloc->new($pool); $ba->destroy; Description "APR::BucketAlloc" is used for bucket allocation. "new" Create an "APR::BucketAlloc" object: $ba = APR::BucketAlloc->new($pool); class: "APR::BucketAlloc" arg1: $pool ( "APR::Pool object" ) The pool used to create this object. ret: $ba ( "APR::BucketAlloc object" ) The new object. since: 2.0.00 This bucket allocation list (freelist) is used to create new buckets (via "APR::Bucket->new") and bucket brigades (via "APR::Brigade->new"). You only need to use this method if you aren't running under httpd. If you are running under mod_perl, you already have a bucket allocation available via "$c->bucket_alloc" and "$bb->bucket_alloc". Example: use APR::BucketAlloc (); use APR::Pool (); my $ba = APR::BucketAlloc->(APR::Pool->pool); my $eos_b = APR::Bucket::eos_create($ba); "destroy" Destroy an "APR::BucketAlloc object": $ba->destroy; arg1: $ba ( "APR::BucketAlloc object" ) The freelist to destroy. ret: no return value since: 2.0.00 Once destroyed this object may not be used again. You need to destroy $ba only if you have created it via "APR::BucketAlloc->new". If you try to destroy an allocation not created by this method, you will get a segmentation fault. Moreover normally it is not necessary to destroy allocators, since the pool which created them will destroy them during that pool's cleanup phase. See Also mod_perl 2.0 documentation. Copyright mod_perl 2.0 and its core modules are copyrighted under The Apache Software License, Version 2.0. Authors The mod_perl development team and numerous contributors. perl v5.18.2 2install::TempContent::Objects::mod_perl-2.0.9::docs::api::APR::BucketAlloc(3)
Man Page