-
-
30 Mar 2022 09:25:47 UTC
- Distribution: Test-Smoke
- Module version: 0.008
- Source (raw)
- Browse (raw)
- Changes
- Homepage
- How to Contribute
- Repository
- Issues (24)
- Testers (237 / 5 / 0)
- Kwalitee
Bus factor: 2- 65.73% Coverage
- License: perl_5
- Perl: v5.10.0
- Activity
24 month- Tools
- Download (358.2KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Dependencies
- CGI::Util
- Capture::Tiny
- File::Spec
- HTTP::Tiny
- JSON::XS
- POSIX
- System::Info
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
- NAME
- SYNOPSIS
- CONSTANTS
- DESCRIPTION
- Test::Smoke::SourceTree->new( $tree_dir[, $verbose] )
- $tree->tree_dir
- $tree->verbose
- $tree->canonpath( )
- $tree->rel2abs( [$base_dir] )
- $tree->abs2rel( [$base_dir] )
- $tree->mani2abs( $file[, $base_path] )
- $tree->mani2absdir( $dir[, $base_path] )
- $tree->abs2mani( $file )
- $tree->check_MANIFEST( @ignore )
- $self->_read_mani_file( $path[, $no_croak] )
- $tree->clean_from_MANIFEST( )
- copy_from_MANIFEST( $dest_dir )
- COPYRIGHT
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;
CONSTANTS
- ST_MISSING
- ST_UNDECLARED
DESCRIPTION
Test::Smoke::SourceTree->new( $tree_dir[, $verbose] )
new()
creates a new object, this is a simple scalar containingFile::Spec->rel2abs( $tree_dir)
.$tree->tree_dir
Get the directory.
$tree->verbose
Get verbosity.
$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->mani2absdir( $dir[, $base_path] )
mani2abs()
returns the absolute dirname of$dir
, which should be in "MANIFEST" format (i.e. using '/' as directory separator).$tree->abs2mani( $file )
abs2mani()
returns the MANIFEST style filename.$tree->check_MANIFEST( @ignore )
check_MANIFEST()
reads the MANIFEST file from$self->tree_dir
and compares it with the actual contents of$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).
$self->_read_mani_file( $path[, $no_croak] )
_read_mani_file()
reads the contents of$path
like it is a MANIFEST typeof file and returns a ref to hash with all values setST_MISSING
.$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 )
_copy_from_MANIFEST()
uses the MANIFEST file from$self-
tree_dir> to copy a source-tree to$dest_dir
.COPYRIGHT
(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:
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.
Module Install Instructions
To install Test::Smoke, copy and paste the appropriate command in to your terminal.
cpanm Test::Smoke
perl -MCPAN -e shell install Test::Smoke
For more information on module installation, please visit the detailed CPAN module installation guide.