The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

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

SYNOPSIS

    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;

DESCRIPTION

Test::Smoke::SourceTree->new( $tree_dir )

new() creates a new object, this is a simple scalar containing File::Spec->rel2abs( $tree_dir).

$tree->canonpath( )

canonpath() returns the canonical name for the path, see File::Spec.

$tree->rel2abs( [$base_dir] )

rel2abs() returns the absolute path, see File::Spec.

$tree->abs2rel( [$base_dir] )

abs2rel() returns a relative path, see File::Spec.

$tree->mani2abs( $file[, $base_path] )

mani2abs() returns the absolute filename of $file, which should be in "MANIFEST" format (i.e. using '/' as directory separator).

$tree->abs2mani( $file )

abs2mani() returns the MANIFEST style filename.

$tree->check_MANIFEST( )

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).

$tree->clean_from_MANIFEST( )

clean_from_MANIFEST() removes all files from the source-tree that are not declared in the MANIFEST file.

copy_from_MANIFEST( $dest_dir[, $verbose] )

_copy_from_MANIFEST() uses the MANIFEST file from $$self to copy a source-tree to $dest_dir.

COPYRIGHT

(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.