1Test::Smoke::SourceTreeU(s3e)r Contributed Perl DocumentaTteisotn::Smoke::SourceTree(3)
2
3
4

NAME

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

SYNOPSIS

9           use Test::Smoke::SourceTree qw( :mani_const );
10
11           my $tree = Test::Smoke::SourceTree->new( $tree_dir );
12
13           my $mani_check = $tree->check_MANIFEST;
14           foreach my $file ( sort keys %$mani_check ) {
15               if ( $mani_check->{ $file } == ST_MISSING ) {
16                   print "MANIFEST declared '$file' but it is missing\n";
17               } elsif ( $mani_check->{ $file } == ST_UNDECLARED ) {
18                   print "MANIFEST did not declare '$file'\n";
19               }
20           }
21
22           $tree->clean_from_MANIFEST;
23

DESCRIPTION

25       Test::Smoke::SourceTree->new( $tree_dir )
26           "new()" creates a new object, this is a simple scalar containing
27           "File::Spec->rel2abs( $tree_dir)".
28
29       $tree->canonpath( )
30           "canonpath()" returns the canonical name for the path, see
31           File::Spec.
32
33       $tree->rel2abs( [$base_dir] )
34           "rel2abs()" returns the absolute path, see File::Spec.
35
36       $tree->abs2rel( [$base_dir] )
37           "abs2rel()" returns  a relative path, see File::Spec.
38
39       $tree->mani2abs( $file[, $base_path] )
40           "mani2abs()" returns the absolute filename of $file, which should
41           be in "MANIFEST" format (i.e. using '/' as directory separator).
42
43       $tree->mani2absdir( $dir[, $base_path] )
44           "mani2abs()" returns the absolute dirname of $dir, which should be
45           in "MANIFEST" format (i.e. using '/' as directory separator).
46
47       $tree->abs2mani( $file )
48           "abs2mani()" returns the MANIFEST style filename.
49
50       $tree->check_MANIFEST( @ignore )
51           "check_MANIFEST()" reads the MANIFEST file from $$self and compares
52           it with the actual contents of $$self.
53
54           Returns a hashref with suspicious entries (if any) as keys that
55           have a value of either ST_MISSING (not in directory) or
56           ST_UNDECLARED (not in MANIFEST).
57
58       $self->_read_mani_file( $path[, $no_croak] )
59           "_read_mani_file()" reads the contents of $path like it is a
60           MANIFEST typeof file and returns a ref to hash with all values set
61           "ST_MISSING".
62
63       $tree->clean_from_MANIFEST( )
64           "clean_from_MANIFEST()" removes all files from the source-tree that
65           are not declared in the MANIFEST file.
66
67       copy_from_MANIFEST( $dest_dir[, $verbose] )
68           "_copy_from_MANIFEST()" uses the MANIFEST file from $$self to copy
69           a source-tree to $dest_dir.
70
72       (c) 2002-2003, All rights reserved.
73
74         * Abe Timmerman <abeltje@cpan.org>
75
76       This library is free software; you can redistribute it and/or modify it
77       under the same terms as Perl itself.
78
79       See:
80
81       ·   <http://www.perl.com/perl/misc/Artistic.html>
82
83       ·   <http://www.gnu.org/copyleft/gpl.html>
84
85       This program is distributed in the hope that it will be useful, but
86       WITHOUT ANY WARRANTY; without even the implied warranty of
87       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
88
89
90
91perl v5.12.1                      2008-07-19        Test::Smoke::SourceTree(3)
Impressum