##======================================================================== ## NAME =pod

NAME

DTA::CAB::Format::Raw::Base - Datum parser/formatter: raw untokenized text (common base class)

SYNOPSIS

 ##========================================================================
 ## PRELIMINARIES
 
 use DTA::CAB::Format::Raw::Base;
 
 ##========================================================================
 ## Constructors etc.
 
 $fmt = CLASS_OR_OBJ->new(%args);
 
 ##========================================================================
 ## Methods: Output: Generic
 
 $type = $fmt->mimeType();
 $ext = $fmt->defaultExtension();
 
 ##========================================================================
 ## Methods: Output: API
 
 $fmt = $fmt->putDocument($doc);
 $fmt = $fmt->putData($data);
 

DESCRIPTION

DTA::CAB::Format::Raw::Base is an abstract base class for for untokenized "raw" string I/O. Input methods are expected to be provided by child subclasses.

This class provides DTA::CAB::Format-compliant output methods which writes all and only the canonical ("modern", "normalized") surface form of each token to the output stream. Individual output tokens are separated by a single space character (ASCII 0x20, " ") and individual output sentences are separated by a single newline character (ASCII 0x0A, "\n").

Globals

Variable: @ISA

Inherits from DTA::CAB::Format.

Constructors etc.

new
 $fmt = CLASS_OR_OBJ->new(%args);

object structure: assumed HASH

    {
     ##-- Common
     #utf8 => $bool,    ##-- utf8 mode always on
     #level => $level,  ##-- output level (ignored)
    }

Methods: Output: Generic

mimeType
 $type = $fmt->mimeType();

default returns text/plain

defaultExtension
 $ext = $fmt->defaultExtension();

returns default filename extension for this format

toFh

thin wrapper for DTA::CAB::Format::toFh-

Methods: Output: API

putDocument
 $fmt = $fmt->putDocument($doc);

ye olde guttes

putData
 $fmt = $fmt->putData($data);

puts raw data (uses forceDocument())

AUTHOR

Bryan Jurish <jurish@bbaw.de>

COPYRIGHT AND LICENSE

Copyright (C) 2019 by Bryan Jurish

This package is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.20.2 or, at your option, any later version of Perl 5 you may have available.

SEE ALSO

dta-cab-analyze.perl(1), dta-cab-convert.perl(1), dta-cab-http-server.perl(1), dta-cab-http-client.perl(1), dta-cab-xmlrpc-server.perl(1), dta-cab-xmlrpc-client.perl(1), DTA::CAB::Server(3pm), DTA::CAB::Client(3pm), DTA::CAB::Format(3pm), DTA::CAB(3pm), perl(1), ...