TestLib - Stuff to help the test-suite


    use TestLib;


What is in here?

manify_path( $path )

Do a OS-specific split on the path, and join with '/' for MANIFEST format.

get_dir( $path )

Returns a list of filenames (no directory-names) in $path.

get_file( @path )

The contents of @path are passed to File::Spec->catfile()

Returns the contents of a file, takes note of context (scalar/list).

put_file( $content, @path )

The contents of @path are passed to File::Spec->catfile()

Writes $content to that file and returns the success/failure.

rmtree( @_ )

This is File::Path::rmtree().

mkpath( @_ )

This is File::Path::mkpath().


Loop over some known names for gnu-patch and see if they know about --version.


Check wheris( 'gzip' ) or eval{ require Compress::Zlib }.

do_unzip( $unzip, $uzfile )

Returns the gunzipped contents of $uzfile.


Find either gzip/tar or Compress::Zlib/Archive::Tar

do_untargz( $untargz, $tgzfile )

Gunzip and extract the archive in $tgzfile.

vms_untargz( $untargz, $tgzfile )

Gunzip and extract the archive in $tgzfile.


(c) 2001-2003, All rights reserved.

  * Abe Timmerman <>

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.


This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.