Apache2::TrapSubRequest - Trap a lookup_file/lookup_uri into a scalar
Version 0.04
# ... use Apache2::TrapSubRequest (); sub handler { my $r = shift; my $subr = $r->lookup_uri('/foo'); my $data; $subr->run_trapped(\$data); # ... Apache2::OK; }
Apache2::TrapSubRequest is a mixin to Apache2::SubRequest which enables you to collect the subrequest's response into a scalar reference. There is only one method, "run_trapped", which is demonstrated in the synopsis.
Run the output of a subrequest into a scalar reference.
Dorian Taylor, <dorian@cpan.org>
<dorian@cpan.org>
Please report any bugs or feature requests to bug-apache2-trapsubrequest@rt.cpan.org, or through the web interface at http://rt.cpan.org. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-apache2-trapsubrequest@rt.cpan.org
Copyright 2013 Dorian Taylor.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 .
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
To install Apache2::TrapSubRequest, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Apache2::TrapSubRequest
CPAN shell
perl -MCPAN -e shell install Apache2::TrapSubRequest
For more information on module installation, please visit the detailed CPAN module installation guide.