ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [release] Kpse-0.01: Kpathsea perl interface module, alpha version
@ 2002-04-26 15:25 Taco Hoekwater
  0 siblings, 0 replies; only message in thread
From: Taco Hoekwater @ 2002-04-26 15:25 UTC (permalink / raw)


Hi all,

I just uploaded an alpha version of a new utility I am working on:

  ----------------------
  NAME
       Kpse - Perl extension for the Kpathsea search library

  SYNOPSIS
       use Kpse;
       Kpse::initialize();
       $a = Kpse::lookup("tex","plain.tex");    # hardwired format
       print Kpse::lookup("","cmr10.tfm");      # let Kpse guess format from ext.
       print Kpse::lookup("tex","plain.tex",1); # must exist
       @a = Kpse::lookup("tex","plain.tex");    # find all files

  ABSTRACT
       This package provides a perl interface to the Kpathsea
       library.  Most of the user-level functions are designed to
       mimic kpsewhich behaviour, but low-level libarary inter­
       face functions are also available.
  -----------------

You can get the source tar and a demonstration program from:

	http://www.chatalicious.nl/~taco/Kpse/Kpse-0.01.tar.gz
        http://www.chatalicious.nl/~taco/Kpse/kpsewhich.pl

Build instructions (as usual for a perl extension library):
	tar xzf Kpse-0.01.tar.gz
        cd Kpse-0.01
	perl Makefile.PL
	make
	make install (you may have to be root for this)

Source builds OK on my linux (mandrake 8.2), but that's the only system 
I know anything about at the moment (I am definately interested in 
build reports!).

You are warned that the code is ALPHA level and the documentation nearly
non-existent. "perldoc Kpse" should give you the call interface for
the subroutines that are available, but it doesn't explain much 
about usage (yet). Kpse.pm seems to function ok, but there are probably
still a number of bugs and/or omissions. 

kpsewhich.pl is a demonstration program, it functions exactly like 
the "stock" kpsewhich executable, except for the following:

 - Debug output is always printed *after* the actual command,
   and on stdout instead of stderr.
   (because the library writes to a perl array, not to stderr).
 - the (undocumented) kpsewhich switch --all actually works.
 - startup is somewhat slower (due to perl loading & compilation time)

kpsewhich.pl becomes faster than system("kpsewhich @ARGV") after about four 
lookups, so it is an interesting module if you need to test for the existence
of e.g. macro packages or font files from within a perl script (that's where 
the idea came from in the first place).

Bug reports, feature requests, comments, etc. are all welcome. 

Have fun!

Taco Hoekwater
taco@elvenkind.com


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-04-26 15:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-26 15:25 [release] Kpse-0.01: Kpathsea perl interface module, alpha version Taco Hoekwater

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).