diff options
author | Norbert Preining <preining@logic.at> | 2007-05-24 10:05:59 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2007-05-24 10:05:59 +0000 |
commit | b5563d592e4bea38495f164c00ecdfc653eb429c (patch) | |
tree | d45fa0e1fa6fe8cf4f2aec93121acd36768e78c5 /new-infra/Perl-API.txt | |
parent | f35c2d99a542a12c8b06562395e90f5afbdbcd51 (diff) |
API docs
git-svn-id: svn://tug.org/texlive/trunk@4361 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'new-infra/Perl-API.txt')
-rw-r--r-- | new-infra/Perl-API.txt | 147 |
1 files changed, 147 insertions, 0 deletions
diff --git a/new-infra/Perl-API.txt b/new-infra/Perl-API.txt new file mode 100644 index 00000000000..56c8f2bbda6 --- /dev/null +++ b/new-infra/Perl-API.txt @@ -0,0 +1,147 @@ +API for Perl Modules for new infra +================================== + +Module TLSRC +------------ + +Constructor: + TLSRC->new; + TLSRC->new( name => "foobar", shortdesc => "The foobar package", ...); + +Input/Output + $tlsrc->from_file("package.tlsrc"); + $tlsrc->writeout + without arg to stdout + with arg to filehandle + +Read/Write functions (with argument set, without arg read) + + $tlsrc->name + $tlsrc->shortdesc + $tlsrc->longdesc + $tlsrc->catalogue + $tlsrc->srcpatterns + $tlsrc->docpatterns + $tlsrc->runpatterns + $tlsrc->binpatterns + $tlsrc->depends + $tlsrc->executes + +Generation function + $tlp = $tlsrc->make_tlp($tltree); + generates a TLP object from itself (a TLSRC obj) and + a TLTREE object (see below) + + +Module TLP +---------- + +Constructur: + TLP->new; + TLP->new( name => "foobar", ...); + +Input/Output + $tlp->from_file("package.tlp"); + reads from file, only one tlp allowed in file + $tlp->from_fh($filehandle [, $multi] ); + reads from $filehandle + if $multi is undefined (ie not given) then multiple tlp + in the same file are treated as errors + if $multi is defined then returns after reading one + tlp + returns 1 if it found a tlp, otherwise 0 + $tlp->writeout + without arg to stdout + with arg to filehandle + +Read/Write functions (with argument set, without arg read) + + $tlp->name + $tlp->revision + $tlp->shortdesc + $tlp->longdesc + $tlp->catalogue + $tlp->srcfiles + $tlp->docfiles + $tlp->runfiles + $tlp->binfiles + $tlp->depends + $tlp->executes + + $tlp->add_srcfiles(@files) + adds @files to the list of srcfiles + $tlp->add_docfiles(@files) + adds @files to the list of docfiles + $tlp->add_binfiles(@files) + adds @files to the list of binfiles + $tlp->add_runfiles(@files) + adds @files to the list of runfiles + + $tlp->add_files($type,@files) + adds @files to the list of $type = (run|doc|bin|src)files + + +Module TLTREE +------------- +(this one is still quite hacky) + +Constructor + + TLTREE->new; + TLTREE->new( svnroot => "path/to/svn/managed/dir" ); + +Init functions + + $tltree->init_from_svn + changes to svnroot, calls svn status -v and builds + up all the necessary information + $tltree->init_from_statusfile($file) + does the same as init_from_svn, but from a pre-made + output of svn status -v + +Input/Ouput + + $tltree->print + to stdout, more or less for hacking only not usefull + +Pattern matching functions + + $tltree->get_files_matching_regexp_pattern($type,$pattern) + returns a list of files matching $pattern + (see specification) + + $tltree->get_files_matching_dir_pattern($type,@patwords) + returns a list of files matching a t pattern with words + (see specification) + +Other functions + + $tltree->file_svn_lastrevision($file) + returns the revision of the last change of file + as given by svn status -v + undef if file is not contained in $tltree + + +Module TLDB +----------- + +Constructore + + TLDB->new; + +Input/Output + + $tldb->from_file($filename); + reads a tldb file (tlp descriptions separated by newlines) + + $tldb->writeout + without arg to stdout + with arg to filehandle + +TLP interface + + $tldb->add_tlp($tlp) + adds a TLP to the TLDB + + + |