Char-KPS9566
view release on metacpan or search on metacpan
- import $fix_drive_relative_paths from File::DosGlob/1.04
- support regexp metasymbols \C and \R in regexp
- support regexp metasymbol \N \N{3} \N{3,} \N{3,5}
- \N{CHARNAME} means literal N{CHARNAME}
- \p{PROP} means literal p{PROP}
- \P{PROP} means literal P{PROP}
- \X means literal X
- support POSIX-style character classes
- modifier /a /d /l /u, and /aa of regexp makes die
- use 5.12.0; --> use 5.12.0; no strict qw(refs);
- remove test 201_kanji.t,202_kanji.t,203_kanji.t,204_kanji.t,205_glob.t,210_chmod.t,211_chown.t,212_dbmopen.t,214_glob.t,216_open.t,217_qx.t,218_rename.t,221_sysopen.t,222_system.t,223_truncate.t,225_utime.t,226_chdir.t,227_chmod.t,228_chown.t,229...
- created by INABA Hitoshi
0.75 2011-06-05 00:00:00
- remove Esjis::binmode and Esjis::open (it's a bad idea)
- created by INABA Hitoshi
0.74 2011-06-01 00:00:00
- remove Esjis::k_ test
- fix s#foo#\\#, s#foo#\\#g, s'foo'\\', and s'foo'\\'g
- created by INABA Hitoshi
t/KPS9566/200_sadahiro.t
t/KPS9566/201_kanji.t
t/KPS9566/202_kanji.t
t/KPS9566/203_kanji.t
t/KPS9566/204_kanji.t
t/KPS9566/205_glob.t
t/KPS9566/206_opendir.t
t/KPS9566/207_stat.t
t/KPS9566/208_filetest.t
t/KPS9566/209_grepdir.t
t/KPS9566/210_chmod.t
t/KPS9566/211_chown.t
t/KPS9566/212_dbmopen.t
t/KPS9566/213_do.t
t/KPS9566/214_glob.t
t/KPS9566/215_lstat.t
t/KPS9566/216_open.t
t/KPS9566/217_qx.t
t/KPS9566/218_rename.t
t/KPS9566/219_require.t
t/KPS9566/220_stat.t
t/KPS9566/221_sysopen.t
t/KPS9566/222_system.t
t/KPS9566/223_truncate.t
t/KPS9566/224_unlink.t
t/KPS9566/226_chdir.t
t/KPS9566/227_chmod.t
t/KPS9566/228_chown.t
t/KPS9566/229_glob.t
t/KPS9566/230_mkdir.t
t/KPS9566/231_opendir.t
t/KPS9566/232_qx.t
t/KPS9566/233_rename.t
t/KPS9566/234_rmdir.t
t/KPS9566/235_system.t
t/KPS9566/236_utime.t
t/KPS9566/237_filetest.t
lib/KPS9566.pm view on Meta::CPAN
CORE::eval q{ flock($fh, LOCK_EX) };
}
CORE::eval q{ truncate($fh, 0) };
seek($fh, 0, 0) or die __FILE__, ": Can't seek file: $filename.e\n";
my $e_script = KPS9566::escape_script($filename);
print {$fh} $e_script;
my $mode = (Ekps9566::stat($filename))[2] & 0777;
chmod $mode, "$filename.e";
close($fh) or die "Can't close file: $filename.e: $!";
}
my $fh = gensym();
Ekps9566::_open_r($fh, "$filename.e") or die __FILE__, ": Can't read open file: $filename.e\n";
if (0) {
}
elsif (exists $ENV{'CHAR_NONBLOCK'}) {
}
}
if ($^O =~ /(?:solaris|linux)/i) {
for my $file (@file) {
if (-e $file) {
mkpath(dirname("$tardir/$file"), 0, 0777);
print STDERR "copy $file $tardir/$file\n";
copy($file, "$tardir/$file");
if ($file =~ m/ (?: Build\.PL | Makefile\.PL ) \z/oxmsi) {
chmod(0664, "$tardir/$file");
}
elsif ($file =~ m/\. (?: pl | bat | exe | com ) \z/oxmsi) {
chmod(0775, "$tardir/$file");
}
elsif ($file =~ m{^bin/}oxmsi) {
chmod(0775, "$tardir/$file");
}
else {
chmod(0664, "$tardir/$file");
}
}
}
system(qq{tar -cvf $tardir.tar $tardir});
system(qq{gzip $tardir.tar});
}
else {
#-----------------------------------------------------------------------------
# https://metacpan.org/search?q=Archive%3A%3ATar%3A%3AConstant
print FH_TARBAT ":endofperl\n";
close FH_TARBAT;
}
# make ptar
else {
open(FH_TARBAT, '>ptar') || die "Can't open file: ptar\n";
print FH_TARBAT '#!', &which($^X), "\n";
print FH_TARBAT $ptar;
close FH_TARBAT;
chmod 0755, 'ptar';
}
}
elsif ($target =~ /^pwget(?:\.bat)?$/) {
my $pwget = <<'PWGET_END';
######################################################################
#
# pwget - wget of Perl Poor Tools
#
# Copyright (c) 2011, 2018, 2019 INABA Hitoshi <ina@cpan.org> in a CPAN
print FH_WGETBAT ":endofperl\n";
close FH_WGETBAT;
}
# make pwget
else {
open(FH_WGETBAT, '>pwget') || die "Can't open file: pwget\n";
print FH_WGETBAT '#!', &which($^X), "\n";
print FH_WGETBAT $pwget;
close FH_WGETBAT;
chmod 0755, 'pwget';
}
}
else {
warn "unknown target: $target.\n";
}
}
sub which {
if ($_[0] =~ m#\A / #oxms) {
return $_[0];
t/KPS9566/210_chmod.t view on Meta::CPAN
}
if ($chcp !~ /932|949/oxms) {
print "ok - 1 # SKIP $^X $0\n";
exit;
}
open(FILE,'>F@\') || die "Can't open file: F@\\n";
print FILE "1\n";
close(FILE);
# chmod
if (chmod(0755,'F@\') == 1) {
print "ok - 1 chmod $^X $__FILE__\n";
}
else {
print "not ok - 1 chmod: $! $^X $__FILE__\n";
}
unlink('F@\');
__END__
t/KPS9566/227_chmod.t view on Meta::CPAN
open(FILE,'>D@\/file1.txt') || die "Can't open file: D@\/file1.txt\n";
print FILE "1\n";
close(FILE);
open(FILE,'>D@\/file2.txt') || die "Can't open file: D@\/file2.txt\n";
print FILE "1\n";
close(FILE);
open(FILE,'>D@\/file3.txt') || die "Can't open file: D@\/file3.txt\n";
print FILE "1\n";
close(FILE);
# chmod
if (chmod(0755,'D@\') == 1) {
print "ok - 1 chmod $^X $__FILE__\n";
}
else {
print "not ok - 1 chmod: $! $^X $__FILE__\n";
}
unlink('D@\/file1.txt');
unlink('D@\/file2.txt');
unlink('D@\/file3.txt');
rmdir('directory');
rmdir('D@\');
__END__
( run in 0.304 second using v1.01-cache-2.11-cpan-496ff517765 )