Apache-Test
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
# META.yml, so autogenerate it if it wasn't in the distro
my $no_meta = TOP_LEVEL ? 1 : 0;
WriteMakefile(
NAME => 'Apache::Test',
VERSION => $VERSION,
PREREQ_PM => \%prereq,
NO_META => $no_meta,
dist => {
COMPRESS => 'gzip -9f', SUFFIX => 'gz',
PREOP => 'find $(DISTVNAME) -type d -print|xargs chmod 0755 && ' .
'find $(DISTVNAME) -type f -print|xargs chmod 0644',
TO_UNIX => 'find $(DISTVNAME) -type f -print|xargs dos2unix'
},
clean => {
FILES => "@clean_files",
},
);
# after CPAN/CPANPLUS had a chance to satisfy the requirements,
# enforce those (for those who run things manually)
check_prereqs();
lib/Apache/TestConfig.pm view on Meta::CPAN
my $fh = $self->genfile($file, undef, 1);
my $shebang = make_shebang();
print $fh $shebang;
$self->genfile_warning($file, undef, $fh);
print $fh $content if $content;
close $fh;
chmod 0755, $file;
}
sub make_shebang {
# if perlpath is longer than 62 chars, some shells on certain
# platforms won't be able to run the shebang line, so when seeing
# a long perlpath use the eval workaround.
# see: http://en.wikipedia.org/wiki/Shebang
# http://homepages.cwi.nl/~aeb/std/shebang/
my $shebang = length $Config{perlpath} < 62
? "#!$Config{perlpath}\n"
lib/Apache/TestUtil.pm view on Meta::CPAN
t_write_file($file, "$shebang\n", $code);
$ext;
}
sub t_write_perl_script {
my $file = shift;
my $shebang = "#!$Config{perlpath}\n";
my $warning = Apache::TestConfig->thaw->genwarning($file);
t_write_file($file, $shebang, $warning, @_);
chmod 0755, $file;
}
sub t_mkdir {
my $dir = shift;
makepath($dir);
}
# returns a list of dirs successfully created
sub makepath {
( run in 0.404 second using v1.01-cache-2.11-cpan-496ff517765 )