NAME

DTA::CAB::Format::Raw::Perl - Document parser: raw untokenized text, pure-perl hack

SYNOPSIS

 use DTA::CAB::Format::Raw::Perl;
 
 ##========================================================================
 ## Methods
 
 $fmt = DTA::CAB::Format::Raw::Perl->new(%args);
 @keys = $class_or_obj->noSaveKeys();
 $fmt = $fmt->close();
 $fmt = $fmt->parseRawString(\$str);
 $doc = $fmt->parseDocument();
 $type = $fmt->mimeType();
 $ext = $fmt->defaultExtension();
 

DESCRIPTION

DTA::CAB::Format::Raw::Perl is an input DTA::CAB::Format subclass for untokenized raw string intput using pure perl. It uses DTA::CAB::Format::Raw::Base for output.

Globals

Variable: %DTA::CAB::Format::Raw::Perl::ABBREVS

Pseudo-set of known abbreviations (hack).

Methods

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

%$fmt, %args:

 ##-- Input
 doc => $doc,                    ##-- buffered input document
 abbrevs => \%abbrevs,           ##-- hash of known abbrevs (default: \%ABBREVS)
 ##
 ##-- Output (n/a)
 outbuf    => $stringBuffer,     ##-- buffered output: DISABLED
 #level    => $formatLevel,      ##-- n/a
 ##
 ##-- Common
 encoding => $inputEncoding,     ##-- default: UTF-8, where applicable
noSaveKeys
 @keys = $class_or_obj->noSaveKeys();

Returns list of keys not to be saved Override returns qw(doc outbuf).

close
 $fmt = $fmt->close();

Deletes buffered input document, if any.

fromString
 $fmt = $fmt->fromString($string)

Select input from string $string.

parseRawString
 $fmt = $fmt->parseRawString(\$str);

Guts for fromString(): parse string $str into local document buffer.

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

Wrapper for $fmt->{doc}.

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

Default returns text/plain.

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

Returns default filename extension for this format, here '.raw'.

AUTHOR

Bryan Jurish <moocow@cpan.org>

COPYRIGHT AND LICENSE

Copyright (C) 2010-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.24.1 or, at your option, any later version of Perl 5 you may have available.

SEE ALSO

dta-cab-convert.perl(1), DTA::CAB::Format::Builtin(3pm), DTA::CAB::Format(3pm), DTA::CAB(3pm), perl(1), ...