Text::APL::Writer - writer
Write a template output to various destinations. Accepts a subroutine for a custom implementation.
Returns a reference to subroutine. When called accepts a chunk of template output. Chunk is undefined when template is fully processed. When received an undefined chunk one can close a file, drop the connection etc.
For example a writer to a file handle is implemented as:
sub { print $output $_[0] };
The following destinations are implemented:
$reader->(\$scalar); $reader->($filename); $reader->($filehandle); $reader->(sub {...custom code...});
Custom subroutines are used for non-blocking output writing. See examples/ directory for an example using IO::AIO for non-blocking output writing.
examples/
build
Build a writer.
To install Text::APL, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Text::APL
CPAN shell
perl -MCPAN -e shell install Text::APL
For more information on module installation, please visit the detailed CPAN module installation guide.