2 Einträge, 1 Seite |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use ExtUtils::MakeMaker;
use strict;
my $htd = "/srv/www/htdocs";
$htd = prompt("Where is your Document root ?" ,$htd);
WriteMakefile(
NAME => 'HTML::Menu::TreeView',
VERSION_FROM => 'lib/HTML/Menu/TreeView.pm', # finds $VERSION
INSTALLDIRS => 'perl',
INSTALLBIN => "\$(PERLPREFIX)$htd",
PL_FILES => {'extra/release.pl' =>"-release blib/bin -readdir htdocs/"},
PREREQ_PM => {"Module::Signature" => 0.55}, # e.g., Module::Name => 1.1
($] >= 5.005 ? ## Add these new keywords supported since 5.005
(AUTHOR => 'Dirk Lindner <lindnerei@o2online.de>') : ()),
# 'NO_META' => 1,
SIGN => 1,
);
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
use strict;
use Getopt::Long;
my $release = 'blib/';
my $dir ='htdocs/';
my $result = GetOptions("release=s" => \$release,"readdir=s" => \$dir,);
system("mkdir -p $release") unless -e $release;
&change($dir);
sub change{
my $d = shift;
chomp($d);
opendir(IN,$d) or die "cant open $d $!:\n";
my @files = readdir(IN);
closedir(IN);
for(my $i = 0; $i <= $#files; $i++){
unless($files[$i]=~/^\./ ){
my $c = $d.$files[$i];
my $e = $c;
$e=~s/^$dir(.*)/$1/;
unless(-d $d.$files[$i]){
#system("perltidy $c") if (-e $d.".perltidyrc" && $files[$i]=~/.*(\.pl|\.pm)$/);
system(" cp ".$c." $release/$e") unless( -e $release."/".$e && $files[$i]=~/\~$/ );
}else{
unless($files[$i]=~/CVS/ ){
system("mkdir -p $release/$e") unless(-e $release."/".$e );
&change($d.$files[$i]."/");
}
}
}
}
}
1;
2 Einträge, 1 Seite |