view release on metacpan or search on metacpan
mod_aimproxy.c view on Meta::CPAN
111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140n = c -> pass -> nelts ;
for
(i = 0; i < n; i++)
{
if
(strncmp (uri, ent[i].proxysrc, ent[i].proxysrclen) == 0)
{
/
*fprintf
(stderr,
"found %s -> %s\n"
, ent[i].proxysrc, ent[i].proxyhost) ;*/
found = 1 ;
break ;
}
}
if
(!found)
{
/
*fprintf
(stderr,
"aimproxy not found %s\n"
, uri) ;*/
return
DECLINED ; /* is not
our
request */
}
proxyhost = ent[i].proxyhost ;
args = r -> args ;
path_info = r -> path_info ;
/* If the file
exists
and there are
no
transformation arguments
just decline the transaction. It will be handled as usual. */
/
*fprintf
(stderr,
"uri %s args %s path_info %s\n"
, uri, args, path_info) ;*/
/
*fprintf
(stderr,
"r -> finfo.st_mode %d\n"
, r -> finfo.st_mode) ;*/
if
((!args || !
*args
) && (!path_info || !
*path_info
) && r -> finfo.st_mode)
return
DECLINED ;
/* calculate name of cache file */
file = r->filename;
mod_aimproxy.c view on Meta::CPAN
143144145146147148149150151152153154155156157if
(ext)
ext++ ;
else
ext =
""
;
cachefn = ap_pstrcat (r -> pool, md5,
"."
, ext, NULL) ;
/
*fprintf
(stderr,
"cachefn = %s\n"
, cachefn) ;*/
cachedir = c -> cachedir ;
cachepath = ap_pstrcat (r -> pool, cachedir,
"/"
, cachefn, NULL) ;
/
*fprintf
(stderr,
"cachepath = %s\n"
, cachepath) ;*/
if
(
stat
(cachepath,
&finfo
) == 0)
{ /* let apache
do
the rest
if
image already
exists
*/
r -> filename = cachepath ;
r -> path_info =
""
;
memcpy (
&r
-> finfo,
&finfo
, sizeof (r -> finfo)) ;
mod_aimproxy.c view on Meta::CPAN
view all matches for this distribution
162163164165166167168169170r->filename = ap_pstrcat(r->pool,
"proxy:http://"
, proxyhost, r-> uri, NULL);
r->handler =
"proxy-server"
;
r->proxyreq = PROXY_PASS;
/
*fprintf
(stderr,
"proxy to = %s\n"
, r->filename) ;*/
return
OK;
}
view release on metacpan or search on metacpan
617618619620621622623624625626627PerlIO_read||5.007003|
PerlIO_seek||5.007003|
PerlIO_set_cnt||5.007003|
PerlIO_set_ptrcnt||5.007003|
PerlIO_setlinebuf||5.007003|
PerlIO_stderr||5.007003|
PerlIO_stdin||5.007003|
PerlIO_stdout||5.007003|
PerlIO_tell||5.007003|
PerlIO_unread||5.007003|
PerlIO_write||5.007003|
view all matches for this distribution
19371938193919401941194219431944194519461947warner_nocontext|||vn
warner||5.006000|v
warn
|||v
watch|||
whichsig|||
write_to_stderr|||
yyerror|||
yylex|||
yyparse|||
yywarn|||
);
view release on metacpan or search on metacpan
7980818283848586878889* from
%INC
so the
log
is re-opened
*/
static void inc_delete(void
*data
)
{
SV
*file
= (SV*)data;
/
*fprintf
(stderr,
"removing %s from INC\n"
, SvPV(file,na));*/
(void)hv_delete_ent(GvHV(incgv), file, G_DISCARD, FALSE);
SvREFCNT_dec(file);
}
static void mark_for_inc_delete(SV
*file
)
view all matches for this distribution
117118119120121122123124125126
RETVAL->log_fd = piped_log_write_fd(pl);
}
else
{
char
*fname
= server_root_relative(p, RETVAL->fname);
if
((RETVAL->log_fd = popenf(p, fname, xfer_flags, xfer_mode)) < 0) {
fprintf(stderr,
"Apache::LogFile: could not open log file %s.\n"
,
fname);
exit
(1);
}
}
view release on metacpan or search on metacpan
view all matches for this distribution
6364656667686970717273static void
dump_Mmap( m )
Mmap
*m
;
{
if
( m != NULL )
fprintf( stderr,
"Apache::Mmap %x:\naddr: %x\tlen: %d\tcur: %d\noff: %d\tprot: %d\tflags: %d\n"
,
m, m->addr, m->len, m->cur, m->off, m->prot, m->flags );
}
static
int
view release on metacpan or search on metacpan
lib/Apache/Perldoc.pm view on Meta::CPAN
view all matches for this distribution
3637383940414243444546
}
else
{
$perldoc
||=
"perldoc"
;
$pod2html
||=
"pod2html"
;
}
# Get the path name and throw away errors on stderr
my
$filename
=
qx( $perldoc -l $pod 2> /dev/null )
;
if
($?) {
"No such perldoc. Either you don't have that module installed, or the author neglected to provide documentation."
;
view release on metacpan or search on metacpan
lib/Apache/Pod/HTML.pm view on Meta::CPAN
view all matches for this distribution
126127128129130131132133134135136my
$file
= Apache::Pod::getpodfile(
$r
);
if
(
$file
) {
my
$parser
= Pod::Simple::HTML->new;
$parser
->no_errata_section(1);
$parser
->complain_stderr(1);
$parser
->output_string( \
$body
);
$parser
->
index
(
$r
->dir_config(
'INDEX'
) );
if
(
my
$prefix
=
$r
->dir_config(
'LINKBASE'
) ) {
if
(
$prefix
eq
'LOCAL'
) {
$prefix
=
$r
->location .
'/'
;
view release on metacpan or search on metacpan
Scoreboard.xs view on Meta::CPAN
163164165166167168169170171172173
"running under mod_perl"
);
#endif
}
#ifdef DUMMY_SCOREBOARD
#define MY_WARN fprintf(stderr,
#else
#define MY_WARN ap_log_error(APLOG_MARK, APLOG_ERR, 0, modperl_global_get_server_rec(),
#endif
#if 0
Scoreboard.xs view on Meta::CPAN
229230231232233234235236237238239psize = sizeof(process_score) * image->server_limit;
msize = sizeof(worker_score) * image->thread_limit;
ssize = msize * image->server_limit;
tsize = psize + ssize + sizeof(global_score) + sizeof(buf);
/* fprintf(stderr,
"sizes %d, %d, %d, %d, %d\n"
,
psize, ssize, sizeof(global_score) , sizeof(buf), tsize); */
pack16(ptr, psize);
ptr += SIZE16;
pack16(ptr, ssize);
Scoreboard.xs view on Meta::CPAN
425426427428429430431432433434435sb = image->sb;
for
(i = 0; i < image->server_limit; i++) {
if
(!(sb->parent[i].pid)) {
break;
}
/* fprintf(stderr,
"pids: server %d: pid %d\n"
,
i, (
int
)(sb->parent[i].pid)); */
av_push(av, newSViv(sb->parent[i].pid));
}
RETVAL = newRV_noinc((SV*)av);
Scoreboard.xs view on Meta::CPAN
view all matches for this distribution
475476477478479480481482483484485CODE:
sb = image->sb;
for
(i = 0; i < image->thread_limit; ++i) {
/* fprintf(stderr,
"thread_num: server %d, thread %d pid %d\n"
,
i, sb->servers[parent_idx][i].thread_num,
(
int
)(sb->parent[parent_idx].pid)); */
av_push(av, newSViv(sb->servers[parent_idx][i].thread_num));
}
view release on metacpan or search on metacpan
lib/Apache/SdnFw/lib/Core.pm view on Meta::CPAN
view all matches for this distribution
10571058105910601061106210631064106510661067# setup some convience variables so we have to type less
$s
->{uof} =
"$s->{ubase}/$s->{object}/$s->{function}"
;
$s
->{uo} =
"$s->{ubase}/$s->{object}"
;
if
(
$s
->{o}{log_stderr}) {
my
$dd
= Data::Dumper->new([\%{
$s
->{in}}],[
qw(data)
]);
$dd
->Indent(0);
$s
->db_insert(
'object_debug'
,{
o
=>
$s
->{object},
f
=>
$s
->{function},
view release on metacpan or search on metacpan
SubProcess.xs view on Meta::CPAN
5455565758596061626364PUSHMARK(sp);
XPUSHs(perl_bless_request_rec(info->r));
PUTBACK;
count = perl_call_sv(info->cv, G_EVAL | G_SCALAR);
if
(perl_eval_ok(info->r->server) != OK) {
fprintf(stderr,
"FAIL: %s\n"
, SvPV(ERRSV,na));
}
/*
SPAGAIN;
PUTBACK;
SubProcess.xs view on Meta::CPAN
view all matches for this distribution
111112113114115116117118119120121PREINIT:
char *
*env
;
CODE:
env = ap_create_environment(r->pool, r->subprocess_env);
ap_error_log2stderr(r->server);
ap_cleanup_for_exec();
RETVAL = ap_call_exec(r, (child_info *)r->request_config, pgm, env, 0);
ap_log_error(APLOG_MARK, APLOG_ERR, NULL,
"Apache::SubProcess exec of %s failed"
, pgm);
view release on metacpan or search on metacpan
xt/99-compile.t view on Meta::CPAN
view all matches for this distribution
1617181920212223242526272829303132333435363738my
$last_version
=
undef
;
sub
check {
return
if
(! m{(\.pm|\.pl) \z}xmsi);
my
(
$stdout
,
$stderr
,
$exit
) = capture(
sub
{
system
( $^X,
'-Mblib'
,
'-c'
,
$_
);
});
s!\s*\z!!
for
(
$stdout
,
$stderr
);
if
(
$exit
) {
diag
$stderr
;
diag
"Exit code: "
,
$exit
;
fail(
$_
);
}
elsif
(
$stderr
ne
"$_ syntax OK"
) {
diag
$stderr
;
fail(
$_
);
}
else
{
pass(
$_
);
};
}
view release on metacpan or search on metacpan
view all matches for this distribution
129130131132133134135136137138139
more verbose debugging output (decoded flags)
0.14 26. Feb 2002
- fixed a problem that page content of Perl sometimes goes to the
stderr instead of stdout
0.13 9. Jan 2002
-
return
mapped username,
when
second request on same connection,
instead of unmapped
view release on metacpan or search on metacpan
740741742743744745746747748749750PerlIO_read||5.007003|
PerlIO_seek||5.007003|
PerlIO_set_cnt||5.007003|
PerlIO_set_ptrcnt||5.007003|
PerlIO_setlinebuf||5.007003|
PerlIO_stderr||5.007003|
PerlIO_stdin||5.007003|
PerlIO_stdout||5.007003|
PerlIO_tell||5.007003|
PerlIO_unread||5.007003|
PerlIO_write||5.007003|
view all matches for this distribution
24122413241424152416241724182419242024212422warner|5.006000|5.004000|pv
warn
|||v
watch|||
whichsig|||
write_no_mem|||
write_to_stderr|||
xmldump_all|||
xmldump_attr|||
xmldump_eval|||
xmldump_form|||
xmldump_indent|||v
view release on metacpan or search on metacpan
t/01-compile.t view on Meta::CPAN
view all matches for this distribution
31323334353637383940414243444546474849my
@warnings
;
for
my
$lib
(
@module_files
)
{
# see L<perlfaq8/How can I capture STDERR from an external command?>
my
$stderr
= IO::Handle->new;
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 release on metacpan or search on metacpan
t/01-compile.t view on Meta::CPAN
view all matches for this distribution
31323334353637383940414243444546474849my
@warnings
;
for
my
$lib
(
@module_files
)
{
# see L<perlfaq8/How can I capture STDERR from an external command?>
my
$stderr
= IO::Handle->new;
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 release on metacpan or search on metacpan
740741742743744745746747748749750PerlIO_read||5.007003|
PerlIO_seek||5.007003|
PerlIO_set_cnt||5.007003|
PerlIO_set_ptrcnt||5.007003|
PerlIO_setlinebuf||5.007003|
PerlIO_stderr||5.007003|
PerlIO_stdin||5.007003|
PerlIO_stdout||5.007003|
PerlIO_tell||5.007003|
PerlIO_unread||5.007003|
PerlIO_write||5.007003|
view all matches for this distribution
24122413241424152416241724182419242024212422warner|5.006000|5.004000|pv
warn
|||v
watch|||
whichsig|||
write_no_mem|||
write_to_stderr|||
xmldump_all|||
xmldump_attr|||
xmldump_eval|||
xmldump_form|||
xmldump_indent|||v
view release on metacpan or search on metacpan
740741742743744745746747748749750PerlIO_read||5.007003|
PerlIO_seek||5.007003|
PerlIO_set_cnt||5.007003|
PerlIO_set_ptrcnt||5.007003|
PerlIO_setlinebuf||5.007003|
PerlIO_stderr||5.007003|
PerlIO_stdin||5.007003|
PerlIO_stdout||5.007003|
PerlIO_tell||5.007003|
PerlIO_unread||5.007003|
PerlIO_write||5.007003|
view all matches for this distribution
24122413241424152416241724182419242024212422warner|5.006000|5.004000|pv
warn
|||v
watch|||
whichsig|||
write_no_mem|||
write_to_stderr|||
xmldump_all|||
xmldump_attr|||
xmldump_eval|||
xmldump_form|||
xmldump_indent|||v
view release on metacpan or search on metacpan
lib/Apache2/Pod/HTML.pm view on Meta::CPAN
view all matches for this distribution
124125126127128129130131132133134my
$body
;
my
$file
= Apache2::Pod::getpodfile(
$r
);
my
$fun
=
undef
;
my
$parser
= Apache2::Pod::PodSimpleHTML->new;
$parser
->no_errata_section(1);
$parser
->complain_stderr(1);
$parser
->output_string( \
$body
);
$parser
->
index
(
$r
->dir_config(
'INDEX'
) );
if
(
my
$prefix
=
$r
->dir_config(
'LINKBASE'
) ) {
if
(
$prefix
eq
'LOCAL'
) {
$prefix
=
$r
->location .
'/'
;
view release on metacpan or search on metacpan
lib/Apache2/PodBrowser.pm view on Meta::CPAN
view all matches for this distribution
352353354355356357358359360361362$parser
->html_css(_stylesheet(
$r
))
if
(
$parser
->can(
'html_css'
));
$parser
->html_header_after_title(
$parser
->html_header_after_title.
_indexlink(INDEX_NORMAL).
"\n"
)
if
(
$uplink
and
$parser
->can(
'html_header_after_title'
));
$parser
->no_errata_section(1);
$parser
->complain_stderr(1);
$parser
->output_string( \
$body
);
$parser
->
index
(
$r
->dir_config(
'INDEX'
) )
if
(
$parser
->can(
'index'
));
if
(
$parser
->can(
'perldoc_url_prefix'
)) {
my
$prefix
=
$r
->dir_config(
'LINKBASE'
);
if
(
defined
$prefix
) {
view release on metacpan or search on metacpan
lib/Apache2/SSI/File/Type.pm view on Meta::CPAN
view all matches for this distribution
271272273274275276277278279280281
return
(
$type
);
}
sub
default_type {
return
(
shift
->_set_get_scalar(
'default_type'
,
@_
) ); }
# Recursively write the magic file to stderr.
# Numbers are written in decimal.
sub
dump
{
my
$self
=
shift
(
@_
);
my
$data
=
shift
(
@_
) ||
$self
->{magic_data};
view release on metacpan or search on metacpan
740741742743744745746747748749750PerlIO_read||5.007003|
PerlIO_seek||5.007003|
PerlIO_set_cnt||5.007003|
PerlIO_set_ptrcnt||5.007003|
PerlIO_setlinebuf||5.007003|
PerlIO_stderr||5.007003|
PerlIO_stdin||5.007003|
PerlIO_stdout||5.007003|
PerlIO_tell||5.007003|
PerlIO_unread||5.007003|
PerlIO_write||5.007003|
view all matches for this distribution
24122413241424152416241724182419242024212422warner|5.006000|5.004000|pv
warn
|||v
watch|||
whichsig|||
write_no_mem|||
write_to_stderr|||
xmldump_all|||
xmldump_attr|||
xmldump_eval|||
xmldump_form|||
xmldump_indent|||v
view release on metacpan or search on metacpan
bin/cron.loghack view on Meta::CPAN
8687888990919293949596my
$self
=
bless
(\
%o
, __PACKAGE__);
local
$SIG
{__DIE__} =
$self
->quiet ?
sub
{
die
@_
if
$^S;
# get out if we're in an eval
$self
->stderr(
@_
);
$self
->death(
@_
);
} :
$SIG
{__DIE__};
my
@got
=
$self
->do_fetch(
@only
?
@only
:
$self
->servers);
my
@links
=
$self
->do_links(
@got
);
bin/cron.loghack view on Meta::CPAN
190191192193194195196197198199200
my
(
@command
) =
@_
;
$self
->stdout(
'running'
,
" @command"
);
my
(
$ret
,
$out
,
$err
) =
$self
->_run(
@command
);
$self
->stdout(
split
(/\n/,
$out
));
$self
->stderr(
split
(/\n/,
$err
));
$ret
or
die
"@command failed:\n$err"
;
return
(
$out
);
}
sub
capture {
bin/cron.loghack view on Meta::CPAN
view all matches for this distribution
208209210211212213214215216217218219220221222223224225226227228229230231232233sub
death {
my
$self
=
shift
;
my
(
@last
) =
@_
;
my
%sym
= (
stderr
=>
'E '
,
stdout
=>
'# '
);
"DEATH\n @last\n"
;
my
$out
=
$self
->{outputs} ||= [];
foreach
my
$line
(
@$out
) {
my
$type
=
shift
(
@$line
);
my
$c
=
$sym
{
$type
} ||
$type
;
# hmm
join
(
' '
,
$c
,
@$line
),
"\n"
;
}
}
my
%fh
= (
stderr
=> \
*STDERR
,
stdout
=> \
*STDOUT
,
);
sub
stderr {
my
$self
=
shift
;
$self
->_store_io(
stderr
=>
@_
);
}
sub
stdout {
my
$self
=
shift
;
$self
->_store_io(
stdout
=>
@_
);
}
view release on metacpan or search on metacpan
t/00-compile.t view on Meta::CPAN
view all matches for this distribution
262728293031323334353637383940my
@warnings
;
for
my
$lib
(
@module_files
)
{
# 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
262728293031323334353637383940my
@warnings
;
for
my
$lib
(
@module_files
)
{
# 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
272829303132333435363738394041my
@warnings
;
for
my
$lib
(
@module_files
)
{
# 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
48495051525354555657585960616263646566my
@warnings
;
for
my
$lib
(
@module_files
)
{
# see L<perlfaq8/How can I capture STDERR from an external command?>
my
$stderr
= IO::Handle->new;
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
view all matches for this distribution
81828384858687888990919293949596979899@switches
= (
@switches
,
split
(
' '
, $1))
if
$1;
close
$fh
and skip(
"$file uses -T; not testable with PERL5LIB"
, 1)
if
grep
{
$_
eq
'-T'
}
@switches
and
$ENV
{PERL5LIB};
my
$stderr
= IO::Handle->new;
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 release on metacpan or search on metacpan
t/00-compile.t view on Meta::CPAN
30313233343536373839404142434445464748my
@warnings
;
for
my
$lib
(
@module_files
)
{
# see L<perlfaq8/How can I capture STDERR from an external command?>
my
$stderr
= IO::Handle->new;
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
view all matches for this distribution
60616263646566676869707172737475767778my
$line
= <
$fh
>;
close
$fh
and skip(
"$file isn't perl"
, 1)
unless
$line
=~ /^
#!\s*(?:\S*perl\S*)((?:\s+-\w*)*)(?:\s*#.*)?$/;
@switches
= (
@switches
,
split
(
' '
, $1))
if
$1;
my
$stderr
= IO::Handle->new;
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 release on metacpan or search on metacpan
t/00-compile.t view on Meta::CPAN
31323334353637383940414243444546474849my
@warnings
;
for
my
$lib
(
@module_files
)
{
# see L<perlfaq8/How can I capture STDERR from an external command?>
my
$stderr
= IO::Handle->new;
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
view all matches for this distribution
64656667686970717273747576777879808182@switches
= (
@switches
,
split
(
' '
, $1))
if
$1;
close
$fh
and skip(
"$file uses -T; not testable with PERL5LIB"
, 1)
if
grep
{
$_
eq
'-T'
}
@switches
and
$ENV
{PERL5LIB};
my
$stderr
= IO::Handle->new;
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 release on metacpan or search on metacpan
t/00-compile.t view on Meta::CPAN
282930313233343536373839404142my
@warnings
;
for
my
$lib
(
@module_files
)
{
# 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/
t/00-compile.t view on Meta::CPAN
view all matches for this distribution
545556575859606162636465666768my
$line
= <
$fh
>;
close
$fh
and skip(
"$file isn't perl"
, 1)
unless
$line
=~ /^
#!\s*(?:\S*perl\S*)((?:\s+-\w*)*)(?:\s*#.*)?$/;
my
@flags
= $1 ?
split
(
' '
, $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"
);
shift
@_warnings
if
@_warnings
and
$_warnings
[0] =~ /^Using .*\bblib/
view release on metacpan or search on metacpan
lib/App/AdditivesUtils.pm view on Meta::CPAN
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Adenosine.pm view on Meta::CPAN
115116117118119120121122123124125
cookie_jar
=>
$self
->cookie_jar(
$uri_base
),
rest
=> \
@extra
,
location
=>
"$_path$query"
,
})};
$self
->stderr(
join
(
" "
,
map
"'$_'"
,
@curl
) .
"\n"
)
if
$self
->verbose;
my
(
$out
,
$err
,
$ret
) =
$self
->capture_curl(
@curl
);
return
$self
->handle_curl_output(
$out
,
$err
,
$ret
);
}
elsif
(
$action
eq
'exports'
) {
<<
'SHELL'
;
lib/App/Adenosine.pm view on Meta::CPAN
153154155156157158159160161162163
$ret
}
sub
stdout {
STDOUT
$_
[1] }
sub
stderr {
STDERR
$_
[1] }
sub
capture_curl {
my
(
$self
,
@rest
) =
@_
;
my
@wrappers
=
grep
{
$_
->does(
'App::Adenosine::Role::WrapsCurlCommand'
) }
lib/App/Adenosine.pm view on Meta::CPAN
178179180181182183184185186187188189my
(
$http_code
) = (
$err
=~ m{.
*HTTP
/1\.[01] (\d)\d\d });
if
(
$self
->verbose) {
my
@filters
=
grep
{
$_
->does(
'App::Adenosine::Role::FiltersStdErr'
) }
$self
->plugins;
$err
=
$_
->filter_stderr(
$err
)
for
@filters
;
$self
->stderr(
$err
)
}
$out
.=
"\n"
unless
$out
=~ m/\n\Z/m;
$self
->stdout(
$out
);
return
if
$http_code
== 2;
return
$http_code
;
lib/App/Adenosine.pm view on Meta::CPAN
view all matches for this distribution
349350351352353354355356357358359360than one hook. The
next
sections document the roles and their respective hooks.
=head2 C<App::Adenosine::Role::FiltersStdErr>
Only a C<filter_stderr> method needs to be implemented. It takes a string
(stderr output from curl) and should return a string. An existing example of
a plugin that consumes this role is L<App::Adenosine::Plugin::Rainbow>.
=head2 C<App::Adenosine::Role::WrapsCurlCommand>
Only a C<wrap> method needs to be implemented. It takes a coderef and should