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

CONSTANTS

25       ST_MISSING
26       ST_UNDECLARED
27

DESCRIPTION

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