view release on metacpan or search on metacpan
t/00-compile.t view on Meta::CPAN
diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} }
$^X, @switches, '-e', "require q[$lib]"))
if $ENV{PERL_COMPILE_TEST_DEBUG};
my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-e', "require q[$lib]");
binmode $stderr, ':crlf' if $^O eq 'MSWin32';
my @_warnings = <$stderr>;
waitpid($pid, 0);
is($?, 0, "$lib loaded ok");
shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/
t/00-compile.t view on Meta::CPAN
diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} }
$^X, @switches, '-c', $file))
if $ENV{PERL_COMPILE_TEST_DEBUG};
my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-c', $file);
binmode $stderr, ':crlf' if $^O eq 'MSWin32';
my @_warnings = <$stderr>;
waitpid($pid, 0);
is($?, 0, "$file compiled ok");
shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/ZofCMS/Plugin/Captcha.pm view on Meta::CPAN
my ( $image_data, $mime_type, $random_number ) = $image->out( force => $conf->{format} );
$t->{d}{session}{captcha} = $random_number;
if ( defined $conf->{file} and length $conf->{file} ) {
if ( open my $fh, '>', $conf->{file} ) {
binmode $fh;
print $fh $image_data;
close $fh;
}
else {
$t->{t}{plug_captcha_error} = $!;
return;
}
}
else {
binmode STDOUT;
print "Content-Type: image/$mime_type\n\n";
print $image_data;
exit
unless $conf->{no_exit};
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/ZofCMS/Plugin/Barcode.pm view on Meta::CPAN
return;
}
if ( defined $conf->{file} and length $conf->{file} ) {
if ( open my $fh, '>', $conf->{file} ) {
binmode $fh;
print $fh $conf->{format} eq 'png'
? $bar->plot( Height => $conf->{height}, NoText => $conf->{no_text} )->png
: $bar->plot( Height => $conf->{height}, NoText => $conf->{no_text} )->gif;
}
else {
$t->{t}{plug_barcode_error} = $!;
return;
}
}
else {
binmode STDOUT;
if ( $conf->{format} eq 'png' ) {
print "Content-Type: image/png\n\n";
print $bar->plot( Height => $conf->{height}, NoText => $conf->{no_text} )->png;
}
else {
view all matches for this distribution
view release on metacpan or search on metacpan
t/00-compile.t view on Meta::CPAN
diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} }
$^X, @switches, '-e', "require q[$lib]"))
if $ENV{PERL_COMPILE_TEST_DEBUG};
my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-e', "require q[$lib]");
binmode $stderr, ':crlf' if $^O eq 'MSWin32';
my @_warnings = <$stderr>;
waitpid($pid, 0);
is($?, 0, "$lib loaded ok");
shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/
t/00-compile.t view on Meta::CPAN
diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} }
$^X, @switches, '-c', $file))
if $ENV{PERL_COMPILE_TEST_DEBUG};
my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-c', $file);
binmode $stderr, ':crlf' if $^O eq 'MSWin32';
my @_warnings = <$stderr>;
waitpid($pid, 0);
is($?, 0, "$file compiled ok");
shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/
view all matches for this distribution
view release on metacpan or search on metacpan
t/10-basics.t view on Meta::CPAN
sub run_command {
my %args = @_;
my @command = @{ $args{command} };
my $pid = open2(my ($in, $out), @command) or die "Couldn't open2($?): $!";
binmode $in, ':crlf' if $^O eq 'MSWin32';
my $ret = do { local $/; <$in> };
waitpid $pid, 0;
return $ret;
}
view all matches for this distribution
view release on metacpan or search on metacpan
t/00-compile.t view on Meta::CPAN
diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} }
$^X, @switches, '-e', "require q[$lib]"))
if $ENV{PERL_COMPILE_TEST_DEBUG};
my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-e', "require q[$lib]");
binmode $stderr, ':crlf' if $^O eq 'MSWin32';
my @_warnings = <$stderr>;
waitpid($pid, 0);
is($?, 0, "$lib loaded ok");
shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/
t/00-compile.t view on Meta::CPAN
diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} }
$^X, @switches, '-c', $file))
if $ENV{PERL_COMPILE_TEST_DEBUG};
my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-c', $file);
binmode $stderr, ':crlf' if $^O eq 'MSWin32';
my @_warnings = <$stderr>;
waitpid($pid, 0);
is($?, 0, "$file compiled ok");
shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/
view all matches for this distribution
view release on metacpan or search on metacpan
xt/author/00-compile.t view on Meta::CPAN
diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} }
$^X, @switches, '-e', "require q[$lib]"))
if $ENV{PERL_COMPILE_TEST_DEBUG};
my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-e', "require q[$lib]");
binmode $stderr, ':crlf' if $^O eq 'MSWin32';
my @_warnings = <$stderr>;
waitpid($pid, 0);
is($?, 0, "$lib loaded ok");
shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/
xt/author/00-compile.t view on Meta::CPAN
diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} }
$^X, @switches, '-c', $file))
if $ENV{PERL_COMPILE_TEST_DEBUG};
my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-c', $file);
binmode $stderr, ':crlf' if $^O eq 'MSWin32';
my @_warnings = <$stderr>;
waitpid($pid, 0);
is($?, 0, "$file compiled ok");
shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/
view all matches for this distribution
view release on metacpan or search on metacpan
t/00-compile.t view on Meta::CPAN
{
# see L<perlfaq8/How can I capture STDERR from an external command?>
my $stderr = IO::Handle->new;
my $pid = open3($stdin, '>&STDERR', $stderr, $^X, $inc_switch, '-e', "require q[$lib]");
binmode $stderr, ':crlf' if $^O eq 'MSWin32';
my @_warnings = <$stderr>;
waitpid($pid, 0);
is($?, 0, "$lib loaded ok");
if (@_warnings)
t/00-compile.t view on Meta::CPAN
my @flags = $1 ? split(/\s+/, $1) : ();
my $stderr = IO::Handle->new;
my $pid = open3($stdin, '>&STDERR', $stderr, $^X, $inc_switch, @flags, '-c', $file);
binmode $stderr, ':crlf' if $^O eq 'MSWin32';
my @_warnings = <$stderr>;
waitpid($pid, 0);
is($?, 0, "$file compiled ok");
# in older perls, -c output is simply the file portion of the path being tested
view all matches for this distribution
view release on metacpan or search on metacpan
xt/author/00-compile.t view on Meta::CPAN
diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} }
$^X, @switches, '-e', "require q[$lib]"))
if $ENV{PERL_COMPILE_TEST_DEBUG};
my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-e', "require q[$lib]");
binmode $stderr, ':crlf' if $^O eq 'MSWin32';
my @_warnings = <$stderr>;
waitpid($pid, 0);
is($?, 0, "$lib loaded ok");
shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/
xt/author/00-compile.t view on Meta::CPAN
diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} }
$^X, @switches, '-c', $file))
if $ENV{PERL_COMPILE_TEST_DEBUG};
my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-c', $file);
binmode $stderr, ':crlf' if $^O eq 'MSWin32';
my @_warnings = <$stderr>;
waitpid($pid, 0);
is($?, 0, "$file compiled ok");
shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/
view all matches for this distribution
view release on metacpan or search on metacpan
# }
# else {
# $self->{log_level} = $trace_level;
# }
# my $file = $self->{file};
# my $binmode ||= ':utf8';
# $binmode = ":$binmode" unless substr($binmode,0,1) eq ':';
# open( $self->{fh}, ">>$binmode", $file )
# or die "cannot open '$file' for append: $!";
# $self->{fh}->autoflush(1);
#}
#
#foreach my $method ( Log::Any::Adapter::Util::logging_methods() ) {
view all matches for this distribution
view release on metacpan or search on metacpan
t/App/cdif/Command.pm view on Meta::CPAN
use IO::File;
my $pid = (my $fh = IO::File->new)->open('-|') // die "open: $@\n";
if ($pid == 0) {
if (my $stdin = $obj->{STDIN}) {
open STDIN, "<&=", $stdin->fileno or die "open: $!\n";
binmode STDIN, ':encoding(utf8)';
}
open STDERR, ">&STDOUT";
exec @command;
die "exec: $@\n";
}
binmode $fh, ':encoding(utf8)';
do { local $/; <$fh> };
}
sub data {
my $obj = shift;
t/App/cdif/Command.pm view on Meta::CPAN
my $obj = shift;
my $data = shift;
my $stdin = $obj->{STDIN} //= do {
my $fh = new_tmpfile IO::File or die "new_tmpfile: $!\n";
$fh->fcntl(F_SETFD, 0) or die "fcntl F_SETFD: $!\n";
binmode $fh, ':encoding(utf8)';
$fh;
};
$stdin->seek(0, 0) or die "seek: $!\n";
$stdin->truncate(0) or die "truncate: $!\n";
$stdin->print($data);
view all matches for this distribution
view release on metacpan or search on metacpan
t/Runner.pm view on Meta::CPAN
my $pid = (my $fh = new IO::File)->open('-|') // die "open: $@\n";
if ($pid == 0) {
if (my $stdin = $obj->{STDIN}) {
open STDIN, "<&=", $stdin->fileno or die "open: $!\n";
$stdin->fcntl(F_SETFD, 0) or die "fcntl F_SETFD: $!\n";
binmode STDIN, ':encoding(utf8)';
}
open STDERR, ">&STDOUT";
$obj->execute;
exit 1;
}
$obj->{STDIN} = undef;
binmode $fh, ':encoding(utf8)';
$obj->{stdout} = do { local $/; <$fh> };
my $child = wait;
$child != $pid and die "child = $child, pid = $pid";
$obj->{pid} = $pid;
$obj->{result} = $?;
t/Runner.pm view on Meta::CPAN
my $obj = shift;
my $data = shift // return $obj;
my $stdin = $obj->{STDIN} //= do {
my $fh = new_tmpfile IO::File or die "new_tmpfile: $!\n";
$fh->fcntl(F_SETFD, 0) or die "fcntl F_SETFD: $!\n";
binmode $fh, ':encoding(utf8)';
$fh;
};
$stdin->seek(0, 0) or die "seek: $!\n";
$stdin->truncate(0) or die "truncate: $!\n";
$stdin->print($data);
view all matches for this distribution
view release on metacpan or search on metacpan
t/Runner.pm view on Meta::CPAN
my $pid = (my $fh = new IO::File)->open('-|') // die "open: $@\n";
if ($pid == 0) {
if (my $stdin = $obj->{STDIN}) {
open STDIN, "<&=", $stdin->fileno or die "open: $!\n";
$stdin->fcntl(F_SETFD, 0) or die "fcntl F_SETFD: $!\n";
binmode STDIN, ':encoding(utf8)';
}
open STDERR, ">&STDOUT";
$obj->execute;
exit 1;
}
$obj->{STDIN} = undef;
binmode $fh, ':encoding(utf8)';
$obj->{stdout} = do { local $/; <$fh> };
my $child = wait;
$child != $pid and die "child = $child, pid = $pid";
$obj->{pid} = $pid;
$obj->{result} = $?;
t/Runner.pm view on Meta::CPAN
my $obj = shift;
my $data = shift // return $obj;
my $stdin = $obj->{STDIN} //= do {
my $fh = new_tmpfile IO::File or die "new_tmpfile: $!\n";
$fh->fcntl(F_SETFD, 0) or die "fcntl F_SETFD: $!\n";
binmode $fh, ':encoding(utf8)';
$fh;
};
$stdin->seek(0, 0) or die "seek: $!\n";
$stdin->truncate(0) or die "truncate: $!\n";
$stdin->print($data);
view all matches for this distribution
view release on metacpan or search on metacpan
t/00-compile.t view on Meta::CPAN
diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} }
$^X, @switches, '-e', "require q[$lib]"))
if $ENV{PERL_COMPILE_TEST_DEBUG};
my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-e', "require q[$lib]");
binmode $stderr, ':crlf' if $^O eq 'MSWin32';
my @_warnings = <$stderr>;
waitpid($pid, 0);
is($?, 0, "$lib loaded ok");
shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/
t/00-compile.t view on Meta::CPAN
diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} }
$^X, @switches, '-c', $file))
if $ENV{PERL_COMPILE_TEST_DEBUG};
my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-c', $file);
binmode $stderr, ':crlf' if $^O eq 'MSWin32';
my @_warnings = <$stderr>;
waitpid($pid, 0);
is($?, 0, "$file compiled ok");
shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/
view all matches for this distribution
view release on metacpan or search on metacpan
t/00-compile.t view on Meta::CPAN
diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} }
$^X, @switches, '-e', "require q[$lib]"))
if $ENV{PERL_COMPILE_TEST_DEBUG};
my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-e', "require q[$lib]");
binmode $stderr, ':crlf' if $^O eq 'MSWin32';
my @_warnings = <$stderr>;
waitpid($pid, 0);
is($?, 0, "$lib loaded ok");
shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/
t/00-compile.t view on Meta::CPAN
diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} }
$^X, @switches, '-c', $file))
if $ENV{PERL_COMPILE_TEST_DEBUG};
my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-c', $file);
binmode $stderr, ':crlf' if $^O eq 'MSWin32';
my @_warnings = <$stderr>;
waitpid($pid, 0);
is($?, 0, "$file compiled ok");
shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/
view all matches for this distribution
view release on metacpan or search on metacpan
t/00-compile.t view on Meta::CPAN
diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} }
$^X, @switches, '-e', "require q[$lib]"))
if $ENV{PERL_COMPILE_TEST_DEBUG};
my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-e', "require q[$lib]");
binmode $stderr, ':crlf' if $^O eq 'MSWin32';
my @_warnings = <$stderr>;
waitpid($pid, 0);
is($?, 0, "$lib loaded ok");
shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/
t/00-compile.t view on Meta::CPAN
diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} }
$^X, @switches, '-c', $file))
if $ENV{PERL_COMPILE_TEST_DEBUG};
my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-c', $file);
binmode $stderr, ':crlf' if $^O eq 'MSWin32';
my @_warnings = <$stderr>;
waitpid($pid, 0);
is($?, 0, "$file compiled ok");
shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/
view all matches for this distribution
view release on metacpan or search on metacpan
t/00-compile.t view on Meta::CPAN
diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} }
$^X, @switches, '-e', "require q[$lib]"))
if $ENV{PERL_COMPILE_TEST_DEBUG};
my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-e', "require q[$lib]");
binmode $stderr, ':crlf' if $^O eq 'MSWin32';
my @_warnings = <$stderr>;
waitpid($pid, 0);
is($?, 0, "$lib loaded ok");
shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/
t/00-compile.t view on Meta::CPAN
diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} }
$^X, @switches, '-c', $file))
if $ENV{PERL_COMPILE_TEST_DEBUG};
my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-c', $file);
binmode $stderr, ':crlf' if $^O eq 'MSWin32';
my @_warnings = <$stderr>;
waitpid($pid, 0);
is($?, 0, "$file compiled ok");
shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/
view all matches for this distribution
view release on metacpan or search on metacpan
t/00-compile.t view on Meta::CPAN
diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} }
$^X, @switches, '-e', "require q[$lib]"))
if $ENV{PERL_COMPILE_TEST_DEBUG};
my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-e', "require q[$lib]");
binmode $stderr, ':crlf' if $^O eq 'MSWin32';
my @_warnings = <$stderr>;
waitpid($pid, 0);
is($?, 0, "$lib loaded ok");
shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/
t/00-compile.t view on Meta::CPAN
diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} }
$^X, @switches, '-c', $file))
if $ENV{PERL_COMPILE_TEST_DEBUG};
my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-c', $file);
binmode $stderr, ':crlf' if $^O eq 'MSWin32';
my @_warnings = <$stderr>;
waitpid($pid, 0);
is($?, 0, "$file compiled ok");
shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/
view all matches for this distribution
view release on metacpan or search on metacpan
t/00-compile.t view on Meta::CPAN
diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} }
$^X, @switches, '-e', "require q[$lib]"))
if $ENV{PERL_COMPILE_TEST_DEBUG};
my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-e', "require q[$lib]");
binmode $stderr, ':crlf' if $^O eq 'MSWin32';
my @_warnings = <$stderr>;
waitpid($pid, 0);
is($?, 0, "$lib loaded ok");
shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/
t/00-compile.t view on Meta::CPAN
diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} }
$^X, @switches, '-c', $file))
if $ENV{PERL_COMPILE_TEST_DEBUG};
my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-c', $file);
binmode $stderr, ':crlf' if $^O eq 'MSWin32';
my @_warnings = <$stderr>;
waitpid($pid, 0);
is($?, 0, "$file compiled ok");
shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/ccdiff.pm view on Meta::CPAN
"new=s" => \$new_color,
"bg=s" => \$rev_color,
"no-colors" => \$no_colors,
"list-colors!" => \$list_colors,
"settings|defaults" => sub {
binmode STDOUT, ":encoding(utf-8)";
printf "%-10s : %s\n", $_, $rc{$_} // "<undef>" for sort keys %rc;
exit 0;
},
"v|verbose:1" => \$opt_v,
lib/App/ccdiff.pm view on Meta::CPAN
set_options ();
$emacs and @_ == 0 && -f $f1 && -f "$f1~" and ($f1, $f2) = ("$f1~", $f1);
$f1 eq "-" && $f2 eq "-" and usage (1);
binmode STDERR, ":encoding(utf-8)";
if ($opt_U) {
binmode STDIN, ":encoding(utf-8)";
binmode STDOUT, ":encoding(utf-8)";
}
my @d1 = ref $f1 eq "ARRAY" ? @$f1 : $f1 eq "-" ? <STDIN> : do {
open my $fh, "<", $f1 or die "$f1: $!\n";
$opt_U and binmode $fh, ":encoding(utf-8)";
<$fh>;
};
my @d2 = ref $f2 eq "ARRAY" ? @$f2 : $f2 eq "-" ? <STDIN> : do {
open my $fh, "<", $f2 or die "$f2: $!\n";
$opt_U and binmode $fh, ":encoding(utf-8)";
<$fh>;
};
if ($opt_H) {
my $hc = "";
if ($opt_H =~ m/^\w\w+/) {
view all matches for this distribution
view release on metacpan or search on metacpan
t/00-compile.t view on Meta::CPAN
diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} }
$^X, @switches, '-e', "require q[$lib]"))
if $ENV{PERL_COMPILE_TEST_DEBUG};
my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-e', "require q[$lib]");
binmode $stderr, ':crlf' if $^O eq 'MSWin32';
my @_warnings = <$stderr>;
waitpid($pid, 0);
is($?, 0, "$lib loaded ok");
shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/
t/00-compile.t view on Meta::CPAN
diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} }
$^X, @switches, '-c', $file))
if $ENV{PERL_COMPILE_TEST_DEBUG};
my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-c', $file);
binmode $stderr, ':crlf' if $^O eq 'MSWin32';
my @_warnings = <$stderr>;
waitpid($pid, 0);
is($?, 0, "$file compiled ok");
shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/cdnget/Downloader.pm view on Meta::CPAN
my $max_size = undef;
if ($self->hook)
{
$max_size = 20*1024*1024;
}
$fh->binmode(":bytes") or $self->throw($!);
my $ua = LWP::UserAgent->new(agent => "p5-cdnget/${App::cdnget::VERSION}",
max_redirect => 1,
max_size => $max_size,
requests_redirectable => [],
timeout => 5);
view all matches for this distribution
view release on metacpan or search on metacpan
t/00-compile.t view on Meta::CPAN
diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} }
$^X, @switches, '-e', "require q[$lib]"))
if $ENV{PERL_COMPILE_TEST_DEBUG};
my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-e', "require q[$lib]");
binmode $stderr, ':crlf' if $^O eq 'MSWin32';
my @_warnings = <$stderr>;
waitpid($pid, 0);
is($?, 0, "$lib loaded ok");
shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/
t/00-compile.t view on Meta::CPAN
diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} }
$^X, @switches, '-c', $file))
if $ENV{PERL_COMPILE_TEST_DEBUG};
my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-c', $file);
binmode $stderr, ':crlf' if $^O eq 'MSWin32';
my @_warnings = <$stderr>;
waitpid($pid, 0);
is($?, 0, "$file compiled ok");
shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/
view all matches for this distribution
view release on metacpan or search on metacpan
#!/usr/bin/perl
use 5.014 ; use warnings ;
use Getopt::Std ; getopts ":01bnuw" , \my%o ;
use Term::ANSIColor qw[ :constants color ] ; $Term::ANSIColor::AUTORESET = 1 ;
use utf8 ;
binmode STDOUT , ":utf8" ; #if ! $o{b} ;
use Encode qw [ decode_utf8 encode_utf8 ] ;
use FindBin qw [ $Script ] ;
my $sdt = sprintf '%04d-%02d-%02d %02d:%02d:%02d', do{my @t= @{[localtime]}[5,4,3,2,1,0]; $t[0]+=1900; $t[1]++; @t } ;
eval "use Encode::JP qw[decode encode];1" or die "Encode::JP cannot be loaded, so -w does not work. ($Script, $sdt)\n" if $o{w} ;
view all matches for this distribution
view release on metacpan or search on metacpan
say STDERR GREEN "$n lines read ($Script). " , scalar localtime ;
alarm $sec
} ;
alarm $sec ;
binmode STDOUT, ":utf8" ;
my %f2 ; # $f2{ $char } [ $times ] ã¯ãåæå charãä¸åº¦timesåæã¤æåããä½è¡ã«åºç¾ããããæ ¼ç´ã
my %fs ; # $f2{$c}[$t] ã® æ°$t ã§ç¾ããå¤ãè¨é²ã
my %fm1 ; # $fm1{$c} ã§ $c ã®åºç¾ã®æå¤§å¤ãè¨é²ãdualvar ã§ãããããªãã¡ããã®æã®æå¤§å¤ã®æã®ãè¡æååãæ ¼ç´ã
my %fm2 ; # %fm1 ã¨ããä¼¼ã¦ããããæå¾ã®ä¾ãåãåºãã dualvar ã§ãããã¨ã¯åãã
my ( %fm1c , %fm2c ) ; # ãã®å¯¾å¿ããæååã®åºç¾åæ°ãæ ¼ç´ããã
view all matches for this distribution
view release on metacpan or search on metacpan
if (!defined $IN) {
push @{$raa_errors}, [$rh_Err->{'Unable to read'} , $F];
$rh_ignored->{$F} = 'cannot read';
} else {
if ($HAVE_Digest_MD5) {
binmode $IN;
my $MD5 = Digest::MD5->new->addfile($IN)->hexdigest;
#print "$F, $MD5\n";
push @{$file_hash{$MD5}}, $F;
} else {
# all files treated unique
view all matches for this distribution
view release on metacpan or search on metacpan
t/00-compile.t view on Meta::CPAN
diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} }
$^X, @switches, '-e', "require q[$lib]"))
if $ENV{PERL_COMPILE_TEST_DEBUG};
my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-e', "require q[$lib]");
binmode $stderr, ':crlf' if $^O eq 'MSWin32';
my @_warnings = <$stderr>;
waitpid($pid, 0);
is($?, 0, "$lib loaded ok");
shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/
t/00-compile.t view on Meta::CPAN
diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} }
$^X, @switches, '-c', $file))
if $ENV{PERL_COMPILE_TEST_DEBUG};
my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-c', $file);
binmode $stderr, ':crlf' if $^O eq 'MSWin32';
my @_warnings = <$stderr>;
waitpid($pid, 0);
is($?, 0, "$file compiled ok");
shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/
view all matches for this distribution
view release on metacpan or search on metacpan
my @Cj ; # åºåã®æã«ä½¿ãã sort { $a <=> $b } keys %Cj ;
my @E1 ; # $E1[$i] = [å
¥å$iåç®(åºå$iè¡ç®)ã®æãå³ã®jã®å¤(ä½ç½®) , å
¥åã§ã®åºç¾å¤ , ãã®ä½ç½®ã¨åºç¾å¤ã®é »åº¦ ] ã
my @E2 ; # [ä½ç½®, åºç¾å¤, é »åº¦] ; $E2[$j] ã§ $E1[$j] ã«æºãããã®ã«ãªãã å½¢å¼ã¯åæ§ã
my @out ; # åºåæã«ãåè¡ã§ä½ãã¿ãåºåãã§è¡¨ç¤ºããããæ ¼ç´ããã
binmode STDOUT, "utf8" if ($o{u}//'') ne 0 ;
## -- -
M : # ãªãã·ã§ã³ -M ãæå®ãããæã
while( <> ) {
chomp ; & R0proc ;
view all matches for this distribution
view release on metacpan or search on metacpan
t/00-compile.t view on Meta::CPAN
diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} }
$^X, @switches, '-e', "require q[$lib]"))
if $ENV{PERL_COMPILE_TEST_DEBUG};
my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-e', "require q[$lib]");
binmode $stderr, ':crlf' if $^O eq 'MSWin32';
my @_warnings = <$stderr>;
waitpid($pid, 0);
is($?, 0, "$lib loaded ok");
shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/
t/00-compile.t view on Meta::CPAN
diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} }
$^X, @switches, '-c', $file))
if $ENV{PERL_COMPILE_TEST_DEBUG};
my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-c', $file);
binmode $stderr, ':crlf' if $^O eq 'MSWin32';
my @_warnings = <$stderr>;
waitpid($pid, 0);
is($?, 0, "$file compiled ok");
shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/
view all matches for this distribution
view release on metacpan or search on metacpan
* decode = * decode_utf8 ;
* decode = sub ( $ ) { $_[0] } if $optu0 ;
#* decode = (! $optu0) ? * decode_utf8 : sub ($){ $_[0] } ; #* encode = $o{u} ? * encode_utf8 : sub ($){ $_[0] } ;
my $optR0 = defined $o{R} && $o{R} eq 0 ;
* R0proc = $optR0 ? sub {} : sub { s/\r$// } ; # -R0 ãæå®ãããæã®å¦ç
binmode *STDOUT , ':utf8' unless $optu0 ; # ããã ãå
¨ä½ã§ä½¿ã夿°ã¨ã¯è¨ãããããããããªããããªãã·ã§ã³ã®å¦çã¯ãã®ç¯ã®ååã«ããã®ã§ã
$| = 1 if $o{'!'} ;
$o{g} //= 6 ; # if ( ! defined $o{g} ) ; # åãåºãæ°
$o{r} //= "~" ; # ç¯å²ã表ãè¨å·(åºåã§ä½¿ã)
$o{c} //= '|' ; # ç¯å²ã示ã表示ãè¤æ°ç¹ããè¨å·(åºåã§ä½¿ã)
$o{'#'} = decode ( $o{'#'} ) if defined $o{'#'} ; # é¤å¤ããæ£è¦è¡¨ç¾
eachFile $_ for @ARGV ;
exit 0 ;
## 1åãã¤ãã¡ã¤ã«ãèªã¿åãã
sub eachFile ( $ ) {
#my $FH = do { my $t = *STDIN if $_[0] eq '-' ; open $t, '<', $_[0] if!$t ; binmode $t , ':gzip(gzip)' if $o{z} ; $t } ; # ãã¡ã¤ã«ãã³ãã«ã®åå¾
my $FH = do{my$t;if($_[0]eq'-'){$t=*STDIN}else{open$t,'<',$_[0]} ; binmode $t , ':gzip(gzip)' if $o{z} ; $t } ; # ãã¡ã¤ã«ãã³ãã«ã®åå¾
$rl = 0 ; # åãã¡ã¤ã«ã®èªã¿åã£ãè¡æ°
# 1. æåã®ååã®ä¸¦ã³ãèªã¿åã:
my @colnames = colnames $FH if $o{'='} ;
# 2. ãã¼ã¿ã®ä¸èº«ãèªã¿åãã¤ã¤ãè¿ãå¤ã¯ãåæ°ãã
my $maxCols = ColFreq $FH, my $colvals ; #my $colvals ; ååã®åãã¼ã¿å¤ã®åº¦æ°ãéè¨;$colvals->[åçª-1]{ãã¼ã¿å¤}=度æ°
view all matches for this distribution