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?>
open my $stdin, '<', File::Spec->devnull or die "can't open devnull: $!";
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)
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Can.pm view on Meta::CPAN
require File::Temp;
my ( $FH, $tmpfile ) = File::Temp::tempfile(
"compilexs-XXXXX",
SUFFIX => '.c',
);
binmode $FH;
print $FH <<'END_C';
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
view all matches for this distribution
view release on metacpan or search on metacpan
lib/ARSObject.pm view on Meta::CPAN
my $s =shift; # ('-b',filename) -> success
my $o =$_[0] =~/^-(?:\w[\w\d+-]*)*$/ ? shift : '-';
my $f =$_[0]; $f ='<' .$f if $f !~/^[<>]/;
eval('use IO::File');
my $h =IO::File->new($f) || return(&{$s->{-die}}($s->efmt('$!',undef,'cannot open file','fopen',$f)));
$h->binmode() if $h && ($o =~/b/);
$h
}
sub fdirls { # Directory listing
lib/ARSObject.pm view on Meta::CPAN
last if $r;
}
return(&{$s->{-die}}($s->efmt('$!',undef,'cannot open file','fstore',$f)))
if !$r;
if ($o =~/b/) {
binmode(FILE);
$r =defined(syswrite(FILE,$_[1]))
}
else {
$r =print FILE join("\n",@_[1..$#_])
}
lib/ARSObject.pm view on Meta::CPAN
last if $r;
}
return(&{$s->{-die}}($s->efmt('$!',undef,'Cannot open file','fload',$f)))
if !$r;
my $b =undef;
binmode(FILE) if $o =~/b/;
$r =read(FILE,$b,-s $f0);
close(FILE);
defined($r) ? $b : &{$s->{-die}}($s->efmt('$!',undef,'Cannot read file','fload',$f))
}
lib/ARSObject.pm view on Meta::CPAN
$r =open(FILE, "<$f");
last if $r;
}
return(&{$s->{-die}}($s->efmt('$!',undef,'Cannot open file','vfload',$f)))
if !$r;
binmode(FILE);
my $v;
sysread(FILE,$v,64,0)
||return(&{$s->{-die}}($s->efmt('$!',$s->{-cmd},undef,'sysread',$f)));
$r =($v
? $v !~/^\$VAR1\s*=/
view all matches for this distribution
view release on metacpan or search on metacpan
Released: 09/20/2005 Version: 1.85
(TS) added binmode-statements in t/10entry.t (test failed on win32)
(TS) warning cleanup in test files (t/02export.t, t/13join.t)
(TS) added ars_SetLogging (changes to ARS.xs, ARS.pm, support.c, support-h.template,
html/manual/toc.html; new files: html/manual/ars_SetLogging.html, t/21setlogging.t)
view all matches for this distribution
view release on metacpan or search on metacpan
applications/htmlroot/cgi-bin/admin/plugins.pl view on Meta::CPAN
if ( $type eq 'application/pdf') {
my $fhOpen = open( FHOPEN, ">$PDPHELPPATH/$ChelpPluginFilename" );
if ($fhOpen) {
binmode FHOPEN;
my $fh = $cgi->upload('helpPluginFilename');
if ( defined $fh ) {
while (<$fh>) { print FHOPEN; }
view all matches for this distribution
view release on metacpan or search on metacpan
t/010-basic/000-setup.t view on Meta::CPAN
}# end if()
my $dbfile = "$temp_root/db_asp4";
open my $ofh, '>', $dbfile
or die "Cannot open '$dbfile' for writing: $!";
binmode($ofh);
SCOPE: {
no warnings 'uninitialized';
print $ofh undef;
};
close($ofh);
view all matches for this distribution
view release on metacpan or search on metacpan
t/010-basic/000-setup.t view on Meta::CPAN
use Digest::MD5 'md5_hex';
my $dbfile = '/tmp/db_asp4captcha';
open my $ofh, '>', $dbfile
or die "Cannot open '$dbfile' for writing: $!";
binmode($ofh);
SCOPE: {
no warnings 'uninitialized';
print $ofh undef;
};
close($ofh);
view all matches for this distribution
view release on metacpan or search on metacpan
div128|||
djSP|||
do_aexec5|||
do_aexec|||
do_aspawn|||
do_binmode||5.004050|
do_chomp|||
do_close|||
do_delete_local|||
do_dump_pad|||
do_eof|||
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/
view all matches for this distribution
view release on metacpan or search on metacpan
examples/cgi/WwwCounter/gifcat.pl view on Meta::CPAN
;# è使¨©ã¯æ¾æ£ãã¾ããããèªç±ã«ä½¿ç¨ã»æ¹é ã»åé
å¸å¯è½ã§ãã
;#
;# åºæ¬çãªä½¿ãæ¹
;# require "gifcat.pl";
;# open(OUT, "> out.gif");
;# binmode(OUT); # MS-DOS ã Windows ã®å ´åã«å¿
è¦ã§ãã
;# print OUT &gifcat'gifcat("xx.gif", "yy.gif", "zz.gif");
;# close(OUT);
;#
;# ãããã°ç¨(GIFã®è§£æåºå)
;# require "gifcat.pl";
examples/cgi/WwwCounter/gifcat.pl view on Meta::CPAN
$useLocalColorTable = 0;
foreach $file (@files) {
$size = -s $file;
open(IN, "$file") || return("ERROR");
binmode(IN);
read(IN, $buf, $size) || return("ERROR");
close(IN);
$cnt = 0;
&GifHeader();
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
# Done in evals to avoid confusing Perl::MinimumVersion
eval( $] >= 5.006 ? <<'END_NEW' : <<'END_OLD' ); die $@ if $@;
sub _read {
local *FH;
open( FH, '<', $_[0] ) or die "open($_[0]): $!";
binmode FH;
my $string = do { local $/; <FH> };
close FH or die "close($_[0]): $!";
return $string;
}
END_NEW
sub _read {
local *FH;
open( FH, "< $_[0]" ) or die "open($_[0]): $!";
binmode FH;
my $string = do { local $/; <FH> };
close FH or die "close($_[0]): $!";
return $string;
}
END_OLD
inc/Module/Install.pm view on Meta::CPAN
# Done in evals to avoid confusing Perl::MinimumVersion
eval( $] >= 5.006 ? <<'END_NEW' : <<'END_OLD' ); die $@ if $@;
sub _write {
local *FH;
open( FH, '>', $_[0] ) or die "open($_[0]): $!";
binmode FH;
foreach ( 1 .. $#_ ) {
print FH $_[$_] or die "print($_[0]): $!";
}
close FH or die "close($_[0]): $!";
}
END_NEW
sub _write {
local *FH;
open( FH, "> $_[0]" ) or die "open($_[0]): $!";
binmode FH;
foreach ( 1 .. $#_ ) {
print FH $_[$_] or die "print($_[0]): $!";
}
close FH or die "close($_[0]): $!";
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Aard.pm view on Meta::CPAN
}
sub new {
my ($self, $file) = @_;
open my $fh, '<', $file or die $!;
binmode $fh;
my %header;
for (@{HEADER_SPEC()}) {
read $fh, my $part, $_->[2];
$header{$_->[0]} = unpack $_->[1], $part;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/6502.pm view on Meta::CPAN
sub load_rom {
my $self = shift;
my ( $f, $a ) = @_;
open my $fh, '<', $f or croak "Can't read $f ($!)\n";
binmode $fh;
my $sz = -s $fh;
sysread $fh, my $buf, $sz or croak "Error reading $f ($!)\n";
close $fh;
$self->write_chunk( $a, $buf );
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Test/Builder.pm view on Meta::CPAN
$self->_try(sub {
require PerlIO;
my @src_layers = PerlIO::get_layers($src);
binmode $dst, join " ", map ":$_", @src_layers if @src_layers;
});
}
#line 1423
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/
view all matches for this distribution
view release on metacpan or search on metacpan
use Encode qw/decode/;
use Term::Encoding;
use Acme::Aheui;
my $encoding = Term::Encoding::get_encoding();
binmode STDIN, ":encoding($encoding)";
my ($filename) = @ARGV;
my $help = << "__HELP__";
Acme::Aheui $Acme::Aheui::VERSION
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Can.pm view on Meta::CPAN
require File::Temp;
my ( $FH, $tmpfile ) = File::Temp::tempfile(
"compilexs-XXXXX",
SUFFIX => '.c',
);
binmode $FH;
print $FH <<'END_C';
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Test/Builder.pm view on Meta::CPAN
$self->_try(
sub {
require PerlIO;
my @src_layers = PerlIO::get_layers($src);
binmode $dst, join " ", map ":$_", @src_layers if @src_layers;
}
);
return;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Archive/Mbox.pm view on Meta::CPAN
my $self = shift;
my $name = shift;
my $altname = shift || $name;
my %attr;
my $contents = read_file($name, err_mode => 'carp', binmode => ':raw');
return unless $contents;
my (undef, undef, $mode, undef, $uid, $gid, undef, undef, undef, $mtime) = stat $name;
$attr{mode} = $mode & 0777;
$attr{uid} = $uid;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/AwesomeQuotes.pm view on Meta::CPAN
package Acme::AwesomeQuotes;
BEGIN {
$Acme::AwesomeQuotes::VERSION = '0.02';
}
binmode STDIN, ':utf8';
binmode STDOUT, ':utf8';
binmode STDERR, ':utf8';
use Exporter;
our @ISA = qw(Exporter);
our @EXPORT_OK = qw(GetAwesome);
our @EXPORT = qw(GetAwesome);
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");
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/
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/
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/
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/CPANAuthors/Acme/CPANAuthors/Authors.pm view on Meta::CPAN
print scalar(@new)
. " new Acme::CPANAuthors authors to add\n";
return if !@new;
require MetaCPAN::API;
my $mcpan = MetaCPAN::API->new();
binmode(STDOUT, ':utf8');
for my $id (sort @new) {
my $author = $mcpan->author($id);
printf " %s => q[%s], # %s\n", $id, $author->{name},
join ', ', map { 'A::C::' . $_ } @{$authors{$id}};
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/
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/
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/
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
lib/Acme/CPANAuthors/Utils/CPANIndex.pm view on Meta::CPAN
$handle = IO::Uncompress::Gunzip->new($file) or croak "Failed to read $file";
}
else {
require IO::File;
$handle = IO::File->new($file, 'r') or croak "Failed to read $file";
binmode $handle;
}
$handle;
}
1;
view all matches for this distribution