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).
new()
File::Spec->rel2abs( $tree_dir)
Get the directory.
Get verbosity.
canonpath() returns the canonical name for the path, see File::Spec.
canonpath()
rel2abs() returns the absolute path, see File::Spec.
rel2abs()
abs2rel() returns a relative path, see File::Spec.
abs2rel()
mani2abs() returns the absolute filename of $file, which should be in "MANIFEST" format (i.e. using '/' as directory separator).
mani2abs()
$file
mani2abs() returns the absolute dirname of $dir, which should be in "MANIFEST" format (i.e. using '/' as directory separator).
$dir
abs2mani() returns the MANIFEST style filename.
abs2mani()
check_MANIFEST() reads the MANIFEST file from $self->tree_dir and compares it with the actual contents of $self->tree_dir.
check_MANIFEST()
$self->tree_dir
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.
_read_mani_file()
$path
ST_MISSING
clean_from_MANIFEST() removes all files from the source-tree that are not declared in the MANIFEST file.
clean_from_MANIFEST()
_copy_from_MANIFEST() uses the MANIFEST file from $self-tree_dir> to copy a source-tree to $dest_dir.
_copy_from_MANIFEST()
$self-
$dest_dir
(c) 2002-2015, 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:
http://www.perl.com/perl/misc/Artistic.html
http://www.gnu.org/copyleft/gpl.html
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.
To install Test::Smoke, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Test::Smoke
CPAN shell
perl -MCPAN -e shell install Test::Smoke
For more information on module installation, please visit the detailed CPAN module installation guide.