
Test::Smoke::SourceTree - Manipulate the perl source-tree

use Test::Smoke::SourceTree qw( :mani_const );
my $tree = Test::Smoke::SourceTree->new( $tree_dir );
my $mani_check = $tree->check_MANIFEST;
foreach my $file ( sort keys %$mani_check ) {
if ( $mani_check->{ $file } == ST_MISSING ) {
print "MANIFEST declared '$file' but it is missing\n";
} elsif ( $mani_check->{ $file } == ST_UNDECLARED ) {
print "MANIFEST did not declare '$file'\n";
}
}
$tree->clean_from_MANIFEST;

new() creates a new object, this is a simple scalar containing File::Spec->rel2abs( $tree_dir).
canonpath() returns the canonical name for the path, see File::Spec.
rel2abs() returns the absolute path, see File::Spec.
abs2rel() returns a relative path, see File::Spec.
mani2abs() returns the absolute filename of $file, which should be in "MANIFEST" format (i.e. using '/' as directory separator).
mani2abs() returns the absolute dirname of $dir, which should be in "MANIFEST" format (i.e. using '/' as directory separator).
abs2mani() returns the MANIFEST style filename.
check_MANIFEST() reads the MANIFEST file from $$self and compares it with the actual contents of $$self.
Returns a hashref with suspicious entries (if any) as keys that have a value of either ST_MISSING (not in directory) or ST_UNDECLARED (not in MANIFEST).
_read_mani_file() reads the contents of $path like it is a MANIFEST typeof file and returns a ref to hash with all values set ST_MISSING.
clean_from_MANIFEST() removes all files from the source-tree that are not declared in the MANIFEST file.
_copy_from_MANIFEST() uses the MANIFEST file from $$self to copy a source-tree to $dest_dir.

(c) 2002-2003, All rights reserved.
* Abe Timmerman <abeltje@cpan.org>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See:
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.