DTA::TokWrap::Document::Maker - DTA tokenizer wrappers: document wrapper: make-mode
use DTA::TokWrap::Document::Maker;
$doc = DTA::TokWrap::Document::Maker->new(%opts);
$doc->makeKey($key);
##-- ... any other DTA::TokWrap::Document method ...
DTA::TokWrap::Document::Maker provides an experimental DTA::TokWrap::Document subclass which attempts to perform make
-like dependency tracking on document data keys.
DTA::TokWrap::Document::Maker inherits from DTA::TokWrap::Document, and should support all DTA::TokWrap::Document methods.
$doc = $CLASS_OR_OBJECT->new(%args);
Low-level constructor for make-mode document wrapper object. See DTA::TokWrap::Document::new.
%defaults = CLASS->defaults();
Static class-dependent defaults.
$doc = $doc->init();
Dynamic object-dependent defaults.
%KEYGEN = ($dataKey => $generatorSpec, ...)
%KEYDEPS = ($dataKey => \@depsForKey, ...)
Recursive key dependencies.
%KEYDEPS_0 = ($dataKey => \@immediateDepsForKey, ...)
Immediate key dependencies.
%KEYDEPS_0 = ($dataKey => {$dep1=>undef,$dep2=>undef,...}, ...)
Recursive dependencies as a hash-of-hashes.
$cmp = DTA::ToKWrap::Document::Maker::keycmp($a,$b);
Sort comparison function for data keys.
@uniqKeys = uniqKeys(@keys);
Returns unique keys from @keys.
@deps0 = PACKAGE::keyDeps0(@docKeys);
Returns unique immediate dependencies for @docKeys.
@deps = PACKAGE::keyDeps(@docKeys);
Returns unique recursive dependencies for @docKeys.
$floating_secs_or_undef = $doc->keyStamp($key);
Returns $doc->{"${key}_stamp"} if it exists. Otherwise returns file modification time for file keys. Returned value is (floating point) seconds since epoch.
@newerDeps = $doc->keyNewerDeps($key);
@newerDeps = $doc->keyNewerDeps($key, $missingDepsAreNewer)
Returns list of recursive dependencies for $key which are newer than $key itself. If $missingDepsAreNewer is given and true, missing dependencies are not allowed.
$bool = $doc->keyIsCurrent($key);
$bool = $doc->keyIsCurrent($key, $requireMissingDeps)
Returns true iff $key is at least as new as all its dependencies.
If $requireMissingDeps is true, missing dependencies are treated as infinitely new (function returns false).
$bool = $doc->genKey($key);
$bool = $doc->genKey($key,\%KEYGEN)
Unconditionally (re-)generate a data key (single step only, ignoring dependencies).
Passes on local \%KEYGEN.
$bool = $doc->makeKey($key);
$bool = $doc->makeKey($key,\%queued)
Conditionally (re-)generate a data key, checking dependencies.
$bool = $doc->makeAll();
Alias for $doc->makeKey('all').
undef = $doc->forceStale(@keys);
Forces all keys @keys to be considered stale by setting $doc->{"${key}_stamp"}=-$ix, where $ix is the index of $key in the dependency-sorted list.
You can use the $doc->keyDeps() method to get a list of all dependencies. In particular, using $doc->keyDeps('all') should mark all keys as stale
$keyval_or_undef = $doc->remakeKey($key);
Unconditionally (re-)generate a data key and all its dependencies.
DTA::TokWrap::Intro(3pm), dta-tokwrap.perl(1), ...
DTA::TokWrap::Intro(3pm), dta-tokwrap.perl(1), ...
Bryan Jurish <jurish@bbaw.de>
Copyright (C) 2009-2018 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.14.2 or, at your option, any later version of Perl 5 you may have available.