view release on metacpan or search on metacpan
lib/Apache/TestConfigPHP.pm view on Meta::CPAN
view all matches for this distribution
311312313314315316317318319320321odbc.allow_persistent = On
odbc.check_persistent = On
odbc.max_persistent = -1
odbc.max_links = -1
odbc.defaultlrl = 4096
odbc.defaultbinmode = 1
[MySQL]
mysql.allow_persistent = On
mysql.max_persistent = -1
mysql.max_links = -1
mysql.default_port =
view release on metacpan or search on metacpan
lib/Apache/Tika/Async.pm view on Meta::CPAN
view all matches for this distribution
123124125126127128129130131132133sub
tika_config_temp_file {
my
(
$self
,
%entries
) =
@_
;
my
(
$fh
,
$name
) = tempfile();
binmode
$fh
;
{
$fh
}
$self
->tika_config(
%entries
);
close
$fh
;
return
$name
;
}
view release on metacpan or search on metacpan
Wyrd/Chart.pm view on Meta::CPAN
view all matches for this distribution
376377378379380381382383384385386eval
{
$gd
->trueColor(0)};
my
$file
=
$self
->{
'_graphic_file'
};
my
$format
=
$self
->{
'_file_format'
};
local
$| = 1;
open
OUT,
"> $file"
||
$self
->_raise_exception(
"Could not write file $file: $!"
);
binmode
(OUT);
eval
{
if
(
$format
eq
'gif'
) {
OUT
$gd
->gif();
}
else
{
OUT
$gd
->png();
view release on metacpan or search on metacpan
lib/Apache2/API/Request.pm view on Meta::CPAN
view all matches for this distribution
759760761762763764765766767768769770}
my
$form
= {};
#my $io = IO::File->new( ">/tmp/form_data.txt" );
#my $io2 = IO::File->new( ">/tmp/form_data_after_our_decoding.txt" );
#my $raw = IO::File->new( ">/tmp/raw_form_data.txt" );
#$io->binmode( ':utf8' );
#$io2->binmode( ':utf8' );
foreach
my
$k
(
@params
)
{
my
(
@values
) =
$r
->param(
$k
);
#$raw->print( "$k => " );
#$io->print( "$k => " );
view release on metacpan or search on metacpan
lib/Apache2/ASP/MediaManager.pm view on Meta::CPAN
125126127128129130131132133134
# Try to open the file for writing:
my
$ofh
= IO::File->new();
$ofh
->
open
(
$filename
,
'>'
)
or
die
"Cannot open file '$filename' for writing: $!"
;
$ofh
->
binmode
;
$ofh
->autoflush(1);
return
$ofh
;
}
# end open_file_for_writing()
lib/Apache2/ASP/MediaManager.pm view on Meta::CPAN
141142143144145146147148149
# Try to open the file for reading:
my
$ifh
= IO::File->new();
$ifh
->
open
(
$filename
,
'<'
)
or
die
"Cannot open file '$filename' for reading: $!"
;
$ifh
->
binmode
;
return
$ifh
;
}
# end open_file_for_reading()
lib/Apache2/ASP/MediaManager.pm view on Meta::CPAN
view all matches for this distribution
156157158159160161162163164165
# Try to open the file for appending:
my
$ofh
= IO::File->new();
$ofh
->
open
(
$filename
,
'>>'
)
or
die
"Cannot open file '$filename' for appending: $!"
;
$ofh
->
binmode
;
$ofh
->autoflush(1);
return
$ofh
;
}
# end open_file_for_appending()
view release on metacpan or search on metacpan
lib/Apache2/AMFCommonLib.pm view on Meta::CPAN
view all matches for this distribution
6263646566676869707172
my
$file
;
if
(
@_
) {
$file
=
shift
;
}
open
(FILE,
$file
) or
die
"Can't open '$file': $!"
;
binmode
(FILE);
my
$returnMD5
=Digest::MD5->new->addfile(
*FILE
)->hexdigest;
return
$returnMD5
;
}
sub
Data {
my
$_sec
;
view release on metacpan or search on metacpan
view all matches for this distribution
12031204120512061207120812091210121112121213div128|||
djSP|||
do_aexec5|||
do_aexec|||
do_aspawn|||
do_binmode||5.004050|
do_chomp|||
do_chop|||
do_close|||
do_dump_pad|||
do_eof|||
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
376377378379380381382383384385386387388389390391392393394395# 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
view all matches for this distribution
416417418419420421422423424425426427428429430431432433434435436# 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 ..
$#_
) {
FH
$_
[
$_
] or
die
"print($_[0]): $!"
;
}
close
FH or
die
"close($_[0]): $!"
;
}
view release on metacpan or search on metacpan
t/01-compile.t view on Meta::CPAN
view all matches for this distribution
3839404142434445464748diag(
'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 release on metacpan or search on metacpan
t/01-compile.t view on Meta::CPAN
view all matches for this distribution
3839404142434445464748diag(
'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 release on metacpan or search on metacpan
inc/Module/Install/Can.pm view on Meta::CPAN
view all matches for this distribution
75767778798081828384
my
(
$FH
,
$tmpfile
) = File::Temp::tempfile(
"compilexs-XXXXX"
,
SUFFIX
=>
'.c'
,
);
binmode
$FH
;
$FH
<<
'END_C'
;
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
view release on metacpan or search on metacpan
t/10-headers.t view on Meta::CPAN
view all matches for this distribution
61626364656667686970local
$Test::Builder::Level
=
$Test::Builder::Level
+ 1;
my
$tmp
= File::Temp->new(
UNLINK
=> 1);
binmode
$tmp
,
':encoding(latin1)'
;
$tmp
$text
;
$tmp
->
close
;
my
$r
= Mock_Request->new(
filename
=>
"$tmp"
,
%$params
);
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
376377378379380381382383384385386387388389390391392393394395# 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
view all matches for this distribution
416417418419420421422423424425426427428429430431432433434435436# 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 ..
$#_
) {
FH
$_
[
$_
] or
die
"print($_[0]): $!"
;
}
close
FH or
die
"close($_[0]): $!"
;
}
view release on metacpan or search on metacpan
view all matches for this distribution
12031204120512061207120812091210121112121213div128|||
djSP|||
do_aexec5|||
do_aexec|||
do_aspawn|||
do_binmode||5.004050|
do_chomp|||
do_chop|||
do_close|||
do_dump_pad|||
do_eof|||
view release on metacpan or search on metacpan
view all matches for this distribution
12031204120512061207120812091210121112121213div128|||
djSP|||
do_aexec5|||
do_aexec|||
do_aspawn|||
do_binmode||5.004050|
do_chomp|||
do_chop|||
do_close|||
do_dump_pad|||
do_eof|||
view release on metacpan or search on metacpan
lib/Apache2/PageKit.pm view on Meta::CPAN
219220221222223224225226227228229# object oriented method call, see Eagle p.65
sub
handler : method {
my
(
$class
,
$requestrec
) =
@_
;
my
(
$pk
,
$model
,
$status_code
);
binmode
STDOUT;
$| = 1;
eval
{
$pk
=
$class
->new(
$requestrec
);
$model
=
$pk
->{model};
lib/Apache2/PageKit.pm view on Meta::CPAN
848849850851852853854855856857858# write output_media to file, using process number of Apache child process
my
$view_cache_dir
=
$view
->{cache_dir};
my
$fo_file
=
"$view_cache_dir/$$.fo"
;
my
$pdf_file
=
"$view_cache_dir/$$.pdf"
;
open
FO_TEMPLATE,
">$fo_file"
or
die
"can't open file: $fo_file ($!)"
;
binmode
FO_TEMPLATE;
FO_TEMPLATE
$$output_ref
;
close
FO_TEMPLATE;
# my $error_message = `$fop_command $fo_file $pdf_file 2>&1 1>/dev/null`;
my
$error_message
= `
$fop_command
$fo_file
$pdf_file
2>&1`;
lib/Apache2/PageKit.pm view on Meta::CPAN
view all matches for this distribution
861862863864865866867868869870871## the errormoessages go also to STDOUT
## and the returncode is always 0
unless
(
$error_message
=~ /^\[ERROR\]:/m){
local
$/;
open
PDF_OUTPUT,
"<$pdf_file"
or
die
"can't open file: $pdf_file ($!)"
;
binmode
PDF_OUTPUT;
$$output_ref
= <PDF_OUTPUT>;
close
PDF_OUTPUT;
}
else
{
die
"Error processing template with Apache XML FOP: $error_message"
;
view release on metacpan or search on metacpan
view all matches for this distribution
7891011121314151617Apache::TestRequest::user_agent(
reset
=> 1,
requests_redirectable
=> 0);
my
@functions
=qw/ -X
abs
accept
alarm
atan2
bind
binmode
bless
caller
chdir
chmod
chomp
chop
chown
chr
chroot
close
closedir
connect
continue
cos
crypt
dbmclose
dbmopen
defined
delete
die
do
dump
each
endgrent
endhostent
endnetent
endprotoent
endpwent
endservent
eof
eval
exec
exists
exit
exp
fcntl
fileno
flock
fork
format
formline
getc
view release on metacpan or search on metacpan
lib/Apache2/REST.pm view on Meta::CPAN
view all matches for this distribution
340341342343344345346347348349
$r
->headers_out()->add(
'Content-length'
,
length
(
$respTxt
)) ;
}
else
{
$r
->err_headers_out()->add(
'Content-length'
,
length
(
$respTxt
)) ;
}
binmode
STDOUT ;
$respTxt
;
return
Apache2::Const::OK ;
}
view release on metacpan or search on metacpan
lib/Apache2/SSI.pm view on Meta::CPAN
view all matches for this distribution
30393040304130423043304430453046304730483049
# Default error message to display when ssi failed to parse
# Default to [an error occurred while processing this directive]
errmsg
=>
'[Oops]'
);
my
$fh
= IO::File->new(
"</some/file.html"
) ||
die
(
"$!\n"
);
$fh
->
binmode
(
':utf8'
);
my
$size
= -s(
$fh
);
my
$html
;
$fh
->
read
(
$html
,
$size
);
$fh
->
close
;
if
( !
defined
(
my
$result
=
$ssi
->parse(
$html
) ) )
view release on metacpan or search on metacpan
view all matches for this distribution
12031204120512061207120812091210121112121213div128|||
djSP|||
do_aexec5|||
do_aexec|||
do_aspawn|||
do_binmode||5.004050|
do_chomp|||
do_chop|||
do_close|||
do_dump_pad|||
do_eof|||
view release on metacpan or search on metacpan
inc/Module/Install/Can.pm view on Meta::CPAN
view all matches for this distribution
75767778798081828384
my
(
$FH
,
$tmpfile
) = File::Temp::tempfile(
"compilexs-XXXXX"
,
SUFFIX
=>
'.c'
,
);
binmode
$FH
;
$FH
<<
'END_C'
;
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
view release on metacpan or search on metacpan
lib/Apache2/WebApp/Plugin/File.pm view on Meta::CPAN
view all matches for this distribution
6263646566676869707172}
my
$buffer
=
""
;
# send file as a binary stream
binmode
STDOUT;
local
*FILE
;
open
(FILE,
$file
) or
$self
->error(
"Cannot open file: $!"
);
while
(
read
( FILE,
$buffer
, 4_096 ) ) {
STDOUT
$buffer
;
view release on metacpan or search on metacpan
examples/compress.pl view on Meta::CPAN
345678910111213141516171819202122use
warnings;
use
ApacheLog::Compressor 0.004;
binmode
STDOUT,
':encoding(utf8)'
;
binmode
STDERR,
':encoding(utf8)'
;
my
(
$in
,
$out
) =
@ARGV
;
die
"No input file provided"
unless
defined
$in
&&
length
$in
;
die
"No output file provided"
unless
defined
$out
&&
length
$out
;
# Write all data to binary output file
open
my
$out_fh
,
'>'
,
$out
or
die
"Failed to create output file $out - $!"
;
binmode
$out_fh
;
# Provide a callback to send data through to the file
my
$alc
= ApacheLog::Compressor->new(
on_write
=>
sub
{
my
(
$self
,
$pkt
) =
@_
;
examples/compress.pl view on Meta::CPAN
view all matches for this distribution
3435363738394041424344
}
);
# Input file - normally use whichever one's just been closed + rotated
open
my
$in_fh
,
'<'
,
$in
or
die
"Failed to open input file $in - $!"
;
binmode
$in_fh
,
':encoding(utf8)'
;
# Initial packet to identify which server this came from
$alc
->send_packet(
'server'
,
hostname
=> hostname(),
);
view release on metacpan or search on metacpan
t/00-compile.t view on Meta::CPAN
view all matches for this distribution
2930313233343536373839{
# 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 release on metacpan or search on metacpan
t/00-compile.t view on Meta::CPAN
view all matches for this distribution
2930313233343536373839{
# 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 release on metacpan or search on metacpan
t/00-compile.t view on Meta::CPAN
view all matches for this distribution
3031323334353637383940{
# 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 release on metacpan or search on metacpan
view all matches for this distribution
17181920212223242526
$c
=
substr
$bk
.
$c
, -
$o
{d} ,
$o
{d} ;
$c
=~ y/0123456789 /ï¼ï¼‘23456789 /
if
$o
{f} ;
$out
.=
$c
;
}
binmode
STDOUT,
":utf8"
;
say
$out
;
exit
;
no
utf8 ;
view release on metacpan or search on metacpan
t/00-compile.t view on Meta::CPAN
5556575859606162636465diag(
'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
view all matches for this distribution
8889909192939495969798diag(
'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 release on metacpan or search on metacpan
view all matches for this distribution
910111213141516171819use
App::APA;
getopts(
'1fl:a'
, \
our
%options
);
binmode
( STDOUT ,
':encoding(UTF-8)'
);
# warning: wide character
my
$apa
= App::APA -> new();
if
(
defined
(
$options
{f} or
$options
{1} ) ) {
say
$apa
-> first_item;
view release on metacpan or search on metacpan
t/00-compile.t view on Meta::CPAN
3738394041424344454647diag(
'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
view all matches for this distribution
6768697071727374757677diag(
'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/