view release on metacpan or search on metacpan
lib/AnyEvent/Process.pm view on Meta::CPAN
0 => ['open', '<', '/dev/null']
=item decorate
Decorate every line written to the HANDLE by the child. The DIRECTION must be
C<E<gt>>. ARGS are in the form C<DECORATOR, OUTPUT>. OUTPUT is a glob reference
and specifies a file handle, into which decorated lines are written. Decorator is
a string or a code reference. If the decorator is a string, it is prepended to
every line written by the started process. If the DECORATOR is a code reference,
it is called for each line written to the HANDLE with that line as its argument
and its return value is written to the OUTPUT.
Example:
\*STDERR => ['decorate', '>', 'Child STDERR: ', \*STDERR]
=back
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/REST/Server.pm view on Meta::CPAN
sub read_http_command {
my ($self, $id) = @_;
$self->{connections}{$id}{handle}->push_read(
regex => qr<(GET|POST|PUT|DELETE)\s+([^ ]+)\s+HTTP/(\d.\d)\r?\n>,
sub {
my ($handle, $data) = @_;
$self->{connections}{$id}{command} = $1;
$self->{connections}{$id}{location} = $2;
$self->{connections}{$id}{version} = $3;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/Run.pm view on Meta::CPAN
# Only necessary for the exec, as Perl CODE subroutine goes
# through 0/1/2 which are correct. But of course that coderef
# might invoke exec, so better do it regardless.
# HACK: Using Win32::Console as nothing else exposes SetStdHandle
Win32::Console::_SetStdHandle(
STD_INPUT_HANDLE(),
FdGetOsFHandle(fileno($parent))
);
Win32::Console::_SetStdHandle(
STD_OUTPUT_HANDLE(),
FdGetOsFHandle(fileno($parent))
);
Win32::Console::_SetStdHandle(
STD_ERROR_HANDLE(),
FdGetOsFHandle(fileno($parent))
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/SSH2.pm view on Meta::CPAN
use Net::SSH::Perl::Kex;
use Net::SSH::Perl::ChannelMgr;
use Net::SSH::Perl::Packet;
use Net::SSH::Perl::Buffer;
use Net::SSH::Perl::Constants qw( :protocol :msg2 :compat :hosts :channels :proposal :kex
CHAN_INPUT_CLOSED CHAN_INPUT_WAIT_DRAIN );
use Net::SSH::Perl::Cipher;
use Net::SSH::Perl::AuthMgr;
use Net::SSH::Perl::Comp;
use Net::SSH::Perl::Util qw(:hosts);
use Scalar::Util qw(blessed weaken);
lib/AnyEvent/SSH2.pm view on Meta::CPAN
for my $c (@{ $cmgr->{channels} }) {
next unless defined $c;
if ($c->{wfd} &&
$c->{extended}->length == 0 &&
$c->{output}->length == 0 &&
$c->{ostate} == CHAN_OUTPUT_WAIT_DRAIN ) {
$c->obuf_empty;
}
# ä¸é¢ obuf_empty ä¼ç» ostate åæ CHAN_OUTPUT_CLOSED
# ä¸é¢è¿ä¸ªå°±ä¼åå
³éç»è¿ç¨
if ($c->delete_if_full_closed) {
defined $c->{cb} ? $c->{cb}->() : '';
$cmgr->remove($c->{id});
}
lib/AnyEvent/SSH2.pm view on Meta::CPAN
# è¿æ¯å¤çé¢éä¸çè¾åº, 客æ·ç«¯çè¾å
¥
for my $c (@{ $cmgr->{channels} }) {
next unless defined $c;
my $id = $c->{id};
if ($c->{rfd} && $c->{istate} == CHAN_INPUT_OPEN &&
$c->{remote_window} > 0 &&
$c->{input}->length < $c->{remote_window}) {
$ssh->{watcher}{$id}{rfd} = AE::io $c->{rfd}, 0, sub {
# 顺åºè®°å½ - é¢é - rfd
my $buf;
lib/AnyEvent/SSH2.pm view on Meta::CPAN
};
}
# ç»å
容è¾åº
if (defined $c->{wfd} &&
$c->{ostate} == CHAN_OUTPUT_OPEN ||
$c->{ostate} == CHAN_OUTPUT_WAIT_DRAIN) {
if ($c->{output} and $c->{output}->length > 0) {
$ssh->{watcher}{$id}{wfd} = AE::io $c->{wfd}, 1, sub {
if (my $r = $c->{handlers}{"_output_buffer"}) {
$r->{code}->( $c, $c->{output}, @{ $r->{extra} } );
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/HTTP/Spark.pm view on Meta::CPAN
my $uri=$self->api_url.$url;
my $json=eval {to_json($data)};
return $self->new_false("Failed to convert \$data to json, error was $@") if $@;
my $request=new HTTP::Request(PUT=>$uri,$self->default_headers,$json);
return $self->new_true($request);
}
=item * my $id=$self->que_put_json($cb,$url,$data);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/Sway.pm view on Meta::CPAN
use constant TYPE_RUN_COMMAND => 0;
use constant TYPE_COMMAND => 0;
use constant TYPE_GET_WORKSPACES => 1;
use constant TYPE_SUBSCRIBE => 2;
use constant TYPE_GET_OUTPUTS => 3;
use constant TYPE_GET_TREE => 4;
use constant TYPE_GET_MARKS => 5;
use constant TYPE_GET_BAR_CONFIG => 6;
use constant TYPE_GET_VERSION => 7;
use constant TYPE_GET_BINDING_MODES => 8;
lib/AnyEvent/Sway.pm view on Meta::CPAN
use constant TYPE_SEND_TICK => 10;
use constant TYPE_SYNC => 11;
use constant TYPE_GET_BINDING_STATE => 12;
our %EXPORT_TAGS = ( 'all' => [
qw(sway TYPE_RUN_COMMAND TYPE_COMMAND TYPE_GET_WORKSPACES TYPE_SUBSCRIBE TYPE_GET_OUTPUTS
TYPE_GET_TREE TYPE_GET_MARKS TYPE_GET_BAR_CONFIG TYPE_GET_VERSION
TYPE_GET_BINDING_MODES TYPE_GET_CONFIG TYPE_SEND_TICK TYPE_SYNC
TYPE_GET_BINDING_STATE)
] );
lib/AnyEvent/Sway.pm view on Meta::CPAN
{
my ($self) = @_;
$self->_ensure_connection;
$self->message(TYPE_GET_OUTPUTS)
}
=head2 get_tree
Gets the layout tree from Sway (>= v4.0).
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/UWSGI.pm view on Meta::CPAN
our %IDEMPOTENT = (
DELETE => 1,
GET => 1,
HEAD => 1,
OPTIONS => 1,
PUT => 1,
TRACE => 1,
ACL => 1,
"BASELINE-CONTROL" => 1,
BIND => 1,
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/UserAgent.pm view on Meta::CPAN
});
}
sub get { _do_request(\&HTTP::Request::Common::GET => @_) }
sub head { _do_request(\&HTTP::Request::Common::HEAD => @_) }
sub put { _do_request(\&HTTP::Request::Common::PUT => @_) }
sub delete { _do_request(\&HTTP::Request::Common::DELETE => @_) }
sub post { _do_request(\&HTTP::Request::Common::POST => @_) }
sub patch { _do_request(\&HTTP::Request::Common::PATCH => @_) }
sub options { _do_request(\&HTTP::Request::Common::OPTIONS => @_) }
lib/AnyEvent/UserAgent.pm view on Meta::CPAN
See L<C<get()>|/get>.
=head2 put
This method is a wrapper for the L<C<request()>|/request> method and the
L<C<HTTP::Request::Common::PUT()>|HTTP::Request::Common/PUT $url> function.
See L<C<get()>|/get>.
=head2 delete
This method is a wrapper for the L<C<request()>|/request> method and the
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/WebService/Tracks.pm view on Meta::CPAN
sub generate_xml {
my ( $self, $root, $attrs ) = @_;
my $xml = '';
my $w = XML::Writer->new(OUTPUT => \$xml);
my @keys = sort keys %$attrs;
$w->startTag($root);
foreach my $k (@keys) {
my $v = $attrs->{$k};
lib/AnyEvent/WebService/Tracks.pm view on Meta::CPAN
}
sub do_put {
my ( $self, $uri, $body, $method, $cb ) = @_;
$self->do_request(PUT => $uri, { body => $body }, $method, $cb);
}
sub parse_entities {
my ( $self, $xml, $type, $target_depth ) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/XMPP/Writer.pm view on Meta::CPAN
sub init {
my ($self) = @_;
$self->{write_buf} = "";
$self->{writer} =
XML::Writer->new (OUTPUT => \$self->{write_buf}, NAMESPACES => 1, UNSAFE => 1);
}
=item B<flush ()>
This method flushes the internal write buffer and will invoke the C<write_cb>
view all matches for this distribution
view release on metacpan or search on metacpan
XSPromises.xs view on Meta::CPAN
PUSHMARK(SP);
EXTEND(SP, input_count);
for (i = 0; i < input_count; i++) {
PUSHs(input[i]);
}
PUTBACK;
/* Clear $_ so that callbacks don't end up talking to each other by accident */
SAVE_DEFSV;
DEFSV_set(sv_newmortal());
XSPromises.xs view on Meta::CPAN
result = xspr_result_new(aTHX_ XSPR_RESULT_RESOLVED, count);
for (i = 0; i < count; i++) {
result->result[count-i-1] = SvREFCNT_inc(POPs);
}
}
PUTBACK;
FREETMPS;
LEAVE;
return result;
XSPromises.xs view on Meta::CPAN
deferred()
CODE:
Newxz(RETVAL, 1, AnyEvent__XSPromises__Deferred);
xspr_promise_t* promise = xspr_promise_new(aTHX);
RETVAL->promise = promise;
OUTPUT:
RETVAL
void
___flush()
CODE:
XSPromises.xs view on Meta::CPAN
AnyEvent::XSPromises::Deferred* self
CODE:
Newxz(RETVAL, 1, AnyEvent__XSPromises__Promise);
RETVAL->promise = self->promise;
xspr_promise_incref(aTHX_ RETVAL->promise);
OUTPUT:
RETVAL
void
resolve(self, ...)
AnyEvent::XSPromises::Deferred* self
XSPromises.xs view on Meta::CPAN
bool
is_in_progress(self)
AnyEvent::XSPromises::Deferred* self
CODE:
RETVAL = (self->promise->state == XSPR_STATE_PENDING);
OUTPUT:
RETVAL
void
DESTROY(self)
AnyEvent::XSPromises::Deferred* self
view all matches for this distribution
view release on metacpan or search on metacpan
PUSHMARK(SP);
EXTEND(SP, 3);
PUSHs((SV*)userp); /* XXX This is a weakened reference, will it ever be undef? */
PUSHs(sv_2mortal(newSViv(s)));
PUSHs(sv_2mortal(newSViv(what)));
PUTBACK;
call_sv(MY_CXT.watchset_fn, G_DISCARD | G_VOID);
FREETMPS;
LEAVE;
PUSHMARK(SP);
EXTEND(SP, 2);
PUSHs((SV*)userp); /* XXX This is a weakened reference, will it ever be undef? */
PUSHs(sv_2mortal(newSViv(timeout_ms)));
PUTBACK;
call_sv(MY_CXT.timerset_fn, G_DISCARD | G_VOID);
FREETMPS;
LEAVE;
SAVETMPS;
PUSHMARK(SP);
EXTEND(SP, 1);
PUSHs(sv_2mortal(newSVpvn(ptr, size*nmemb)));
PUTBACK;
call_sv((SV*)userdata, G_DISCARD | G_VOID | G_EVAL);
SPAGAIN;
maybe_warn_eval(aTHX);
PUTBACK;
FREETMPS;
LEAVE;
return size * nmemb;
SAVETMPS;
PUSHMARK(SP);
EXTEND(SP, 1);
PUSHs(sv_2mortal(newSViv(size * nitems)));
PUTBACK;
call_sv((SV*)userdata, G_SCALAR | G_EVAL);
SPAGAIN;
maybe_warn_eval(aTHX);
} else {
result = pvlen;
Copy(pv, buffer, pvlen, char);
}
}
PUTBACK;
FREETMPS;
LEAVE;
return result;
PUSHMARK(SP);
EXTEND(SP, 2);
PUSHs(sv_2mortal(newSViv(type)));
PUSHs(sv_2mortal(newSVpvn(data, size)));
PUTBACK;
call_sv((SV*)userdata, G_DISCARD | G_VOID | G_EVAL);
SPAGAIN;
maybe_warn_eval(aTHX);
PUTBACK;
FREETMPS;
LEAVE;
return 0;
} else {
/* This codepath: return [..trailers..]; */
*output = slist_from_av(aTHX_ *output, (AV*)SvRV(returned));
return_result = CURL_TRAILERFUNC_OK;
}
PUTBACK;
FREETMPS;
LEAVE;
return return_result;
} else {
PUSHs(sv_2mortal(newSVpv(curl_easy_strerror(code), 0)));
}
}
PUTBACK;
call_sv(response->callback, G_DISCARD | G_VOID | G_EVAL);
SPAGAIN;
maybe_warn_eval(aTHX);
PUTBACK;
FREETMPS;
LEAVE;
/* Clean some fields we don't need anymore. We do this now instead of via DESTROY, to break
_get_known_constants()
CODE:
RETVAL = newHV();
sv_2mortal((SV*)RETVAL); /* hehe, perl bugs! */
fill_hv_with_constants(aTHX_ RETVAL);
OUTPUT:
RETVAL
void
DESTROY(self)
SV* self
croak("Don't know what to do with curl's %d (%s)", opt, SvPV_nolen(option));
} else {
croak("Don't know what to do with curl's %d", opt);
}
OUTPUT:
RETVAL
void
DESTROY(self)
SV* self
view all matches for this distribution
view release on metacpan or search on metacpan
AnyMongo.xs view on Meta::CPAN
CODE:
CREATE_BUF(INITIAL_BUF_SIZE);
perl_mongo_sv_to_bson(&buf,sv,NO_PREP);
RETVAL = newSVpvn(buf.start, buf.pos-buf.start);
Safefree(buf.start);
OUTPUT:
RETVAL
SV *
bson_decode(char *bson)
INIT:
AnyMongo.xs view on Meta::CPAN
CODE:
buf.start = bson;
buf.end = bson+strlen(bson);
buf.pos = bson;
RETVAL = perl_mongo_bson_to_sv(&buf);
OUTPUT:
RETVAL
MODULE = AnyMongo PACKAGE = AnyMongo::BSON::OID
PROTOTYPES: DISABLE
AnyMongo.xs view on Meta::CPAN
else {
perl_mongo_make_id(id);
perl_mongo_make_oid(id, oid);
}
RETVAL = newSVpvn(oid, 24);
OUTPUT:
RETVAL
MODULE = AnyMongo PACKAGE = AnyMongo::MongoSupport
PROTOTYPES: DISABLE
AnyMongo.xs view on Meta::CPAN
perl_mongo_sv_to_bson(&buf, fields, NO_PREP);
}
perl_mongo_serialize_size(buf.start, &buf);
RETVAL = newSVpvn(buf.start, buf.pos-buf.start);
Safefree(buf.start);
OUTPUT:
RETVAL
void
build_insert_message(request_id,ns, a)
SV *request_id
AnyMongo.xs view on Meta::CPAN
perl_mongo_serialize_int(&buf, flags);
perl_mongo_sv_to_bson(&buf, criteria, NO_PREP);
perl_mongo_serialize_size(buf.start, &buf);
RETVAL = newSVpvn(buf.start, buf.pos-buf.start);
Safefree(buf.start);
OUTPUT:
RETVAL
SV*
build_update_message(request_id,ns, criteria, obj, flags)
SV *request_id;
AnyMongo.xs view on Meta::CPAN
perl_mongo_sv_to_bson(&buf, criteria, NO_PREP);
perl_mongo_sv_to_bson(&buf, obj, NO_PREP);
perl_mongo_serialize_size(buf.start, &buf);
RETVAL = newSVpvn(buf.start, buf.pos-buf.start);
Safefree(buf.start);
OUTPUT:
RETVAL
SV*
build_get_more_message(request_id,ns, cursor_id,size)
SV *request_id
AnyMongo.xs view on Meta::CPAN
// // cursor id
// perl_mongo_serialize_long(&buf, (int64_t) SvIV(cursor_id));
// perl_mongo_serialize_size(buf.start, &buf);
RETVAL = newSVpvn(buf.start, buf.pos-buf.start);
Safefree(buf.start);
OUTPUT:
RETVAL
SV*
build_kill_cursor_message(request_id_sv,cursor_id)
SV *request_id_sv
AnyMongo.xs view on Meta::CPAN
perl_mongo_serialize_int(&buf, 1);
// cursor ids
perl_mongo_serialize_long(&buf, (int64_t)SvIV(cursor_id));
perl_mongo_serialize_size(buf.start, &buf);
RETVAL = newSVpvn(buf.start, buf.pos-buf.start);
OUTPUT:
RETVAL
SV*
decode_bson_documents(SV *documents)
PREINIT:
AnyMongo.xs view on Meta::CPAN
av_push (ret, sv);
buf.start = buf.pos;
} while( buf.pos < buf.end);
RETVAL = newRV_noinc ((SV *)ret);
OUTPUT:
RETVAL
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AozoraBunko/Checkerkun.pm view on Meta::CPAN
my $YAML_FILE = File::ShareDir::dist_file('AozoraBunko-Checkerkun', 'hiden_no_tare.yml');
my $YAML = YAML::Tiny->read($YAML_FILE)->[0];
my $ENC = Encode::find_encoding("Shift_JIS");
my %VALID_OUTPUT_FORMAT;
@VALID_OUTPUT_FORMAT{qw/plaintext html/} = ();
# [78hosetsu_tekiyo] 78äºæå
æã®å¯¾è±¡ã¨ãªãä¸è¦ãªå¤å注è¨ããã§ãã¯ãã
our $KUTENMEN_78HOSETSU_TEKIYO = $YAML->{'kutenmen_78hosetsu_tekiyo'};
# [hosetsu_tekiyo] å
æã®å¯¾è±¡ã¨ãªãä¸è¦ãªå¤å注è¨ããã§ãã¯ãã
lib/AozoraBunko/Checkerkun.pm view on Meta::CPAN
if ( ! exists $options->{$key} ) { Carp::croak "Unknown option: '$key'"; }
else
{
if ($key eq 'output_format')
{
Carp::croak "Output format option must be 'plaintext' or 'html'" unless exists $VALID_OUTPUT_FORMAT{ $args{$key} };
}
$options->{$key} = $args{$key};
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
This example shows how one might take an arbitrary
URL path /$path/$file.asp, and turn that into a runtime
config for your site, so your scripts get executed
always in your sites DocumentRoot.
INPUT URL /SomeCategory/
OUTPUT
Script: index.asp
$Server->Config('PATH') eq '/SomeCategory'
INPUT URL /SomeCategory/index.asp
OUTPUT
Script: index.asp
$Server->Config('PATH') eq '/SomeCategory'
INPUT URI /index.asp
OUTPUT
Script: index.asp
$Server->Config('PATH') eq ''
# httpd.conf
PerlTransHandler My::Init
view all matches for this distribution
view release on metacpan or search on metacpan
&list_dirs($r, $album_dir, $_, "", $settings );
$r->print("\n</dl>\n");
}
if ($settings->{'EditMode'}) {
$r->print(qq!<FORM METHOD="POST">New Album:<INPUT TYPE="text" NAME="AlbumName"><INPUT TYPE="submit" NAME="New Album" VALUE="New Album"></FORM>!);
unless (@dirs) {
$r->print(&file_upload());
}
}
# places
sub file_upload {
my $ret = <<EOF
<FORM METHOD="POST" ENCTYPE="multipart/form-data">
<INPUT TYPE="submit" NAME="Upload" VALUE="Upload">
<INPUT TYPE="file" NAME="filename" SIZE=50 MAXLENGTH=200>
</FORM>
EOF
;
return $ret;
view all matches for this distribution
view release on metacpan or search on metacpan
examples/conf/confconfer.pl view on Meta::CPAN
use vars qw($VERSION);
$VERSION = substr(q$Revision: 1.3 $, 10, -1);
my $usage =<<"EOU";
>>> confconfer.pl - Fill out a sample config template to make a real config <<<
Usage: confconfer.pl INPUTFILE > OUTPUTFILE
1) Takes single argument which must be a plain text file containing one or
more replacement variables as input.
2) Prompts for the value of each unique replacement variable.
3) Spits out the input with the replacement variables replaced.
view all matches for this distribution
view release on metacpan or search on metacpan
t/htdocs/docs/login.pl view on Meta::CPAN
</TD></TR>
<TR><TD ALIGN=LEFT>
<P>Failure reason: '$reason'. Please enter your login and password to authenticate.</P>
</TD>
<TR><TD>
<INPUT TYPE=hidden NAME=destination VALUE="$uri">
</TD></TR>
<TR><TD>
<TABLE ALIGN=CENTER>
<TR>
<TD ALIGN=RIGHT><B>Login:</B></TD>
<TD><INPUT TYPE="text" NAME="credential_0" SIZE=10 MAXLENGTH=10></TD>
</TR>
<TR>
<TD ALIGN=RIGHT><B>Password:</B></TD>
<TD><INPUT TYPE="password" NAME="credential_1" SIZE=8 MAXLENGTH=8></TD>
</TR>
<TR>
<TD COLSPAN=2 ALIGN=CENTER><INPUT TYPE="submit" VALUE="Continue"></TD>
</TR></TABLE>
</TD></TR></TABLE>
</FORM>
</BODY>
</HTML>
view all matches for this distribution
view release on metacpan or search on metacpan
eg/html/login-failed.html view on Meta::CPAN
<!-- $Id: login-failed.html,v 1.2 2003/10/10 20:53:25 jacob Exp $ -->
FAILED
<FORM ACTION="/LOGIN" METHOD="POST">
<INPUT TYPE="HIDDEN" NAME="destination" VALUE="<#DESTINATION HTMLESC>">
Username: <INPUT TYPE="TEXT" NAME="credential_0" VALUE="<#CREDENTIAL_0>"><BR>
Password: <INPUT TYPE="PASSWORD" NAME="credential_1"><BR>
<INPUT TYPE="SUBMIT" VALUE="Log in">
</FORM>
view all matches for this distribution
view release on metacpan or search on metacpan
<FORM METHOD="POST" ACTION="/LOGIN">
<TABLE ALIGN=CENTER VALIGN=CENTER>
<TR><TD colspan=2 align=center>
<font color=red>$reason</font>
</TD></TR>
<INPUT TYPE=hidden NAME=destination VALUE="$uri">
<TR><TD colspan=2 align=center>
<!--login-->
<table>
<TR><TD align=right>
<B>Login:</B></TD>
<TD><INPUT TYPE="text" NAME="credential_0" SIZE=20 MAXLENGTH=50></TD>
</TR>
<TR>
<TD ALIGN=RIGHT><B>Password:</B></TD>
<TD><INPUT TYPE="password" NAME="credential_1" SIZE=20 MAXLENGTH=20></TD>
</TR>
</table>
<!--end login-->
</TD></TR>
<TR>
<TD COLSPAN=2 ALIGN=CENTER><INPUT TYPE="submit" VALUE="Continue"></TD>
</TR>
</TABLE>
</FORM>
<P>
<a href=>I need to request a new login</a>
view all matches for this distribution
view release on metacpan or search on metacpan
eg/html/login-failed.html view on Meta::CPAN
<!-- $Id: login-failed.html,v 1.1 2000/07/11 17:03:05 jacob Exp $ -->
FAILED
<FORM ACTION="/LOGIN" METHOD="POST">
<INPUT TYPE="HIDDEN" NAME="destination" VALUE="<#DESTINATION HTMLESC>">
Username: <INPUT TYPE="TEXT" NAME="credential_0"><BR>
Password: <INPUT TYPE="PASSWORD" NAME="credential_1"><BR>
<INPUT TYPE="SUBMIT" VALUE="Log in">
</FORM>
view all matches for this distribution
view release on metacpan or search on metacpan
eg/html/changepwd.html view on Meta::CPAN
<!-- $Id: login.html,v 1.1 2000/07/11 17:03:05 jacob Exp $ -->
<FORM ACTION="/ChangePwd" METHOD="POST">
<INPUT TYPE="HIDDEN" NAME="destination" VALUE="<#DESTINATION HTMLESC>">
Username: <INPUT TYPE="TEXT" NAME="credential_0"><BR>
Password: <INPUT TYPE="PASSWORD" NAME="credential_1"><BR>
New Password: <INPUT TYPE="PASSWORD" NAME="credential_2"><BR>
Confirm Password: <INPUT TYPE="PASSWORD" NAME="credential_3"><BR>
<INPUT TYPE="SUBMIT" VALUE="Update&Logout">
</FORM>
view all matches for this distribution
view release on metacpan or search on metacpan
API/typemap view on Meta::CPAN
TYPEMAP
Apache T_APACHEOBJ
OUTPUT
T_APACHEOBJ
sv_setref_pv($arg, \"${ntype}\", (void*)$var);
INPUT
T_APACHEOBJ
r = sv2request_rec($arg, \"$ntype\", cv)
view all matches for this distribution
view release on metacpan or search on metacpan
smb/.svn/text-base/Smb.xs.svn-base view on Meta::CPAN
char * username
char * password
char * server
char * backup
char * domain
OUTPUT:
RETVAL
void *
smb/.svn/text-base/Smb.xs.svn-base view on Meta::CPAN
CODE:
if (!SvPOK (ST(3)) || SvCUR(ST(3)) < 8)
croak ("nonce muist be preallocated with an 8 character string") ;
RETVAL = Valid_User_Connect(server, backup, domain, nonce);
OUTPUT:
RETVAL
int
smb/.svn/text-base/Smb.xs.svn-base view on Meta::CPAN
int
SMBlib_errno()
CODE:
RETVAL = SMBlib_errno ;
OUTPUT:
RETVAL
int
SMBlib_SMB_Error()
CODE:
RETVAL = SMBlib_SMB_Error ;
OUTPUT:
RETVAL
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/AuthzUnix.pm view on Meta::CPAN
my $user = $r->user or return DECLINED();
my $fn = $r->filename;
if (!-e $r->filename) { $fn = dirname($fn) }
# Why did we just do that? Because:
# If we're PUTting a file, we want to check if we can write to the directory.
# Otherwise, we're GETting a non-existent or autogenerated file (ie autoindex)
# If it's a directory index, then we use the permissions of the directory.
# If it's non-existent, permissions are an irrelevance!
my $stat = File::stat::stat($fn);
lib/Apache/AuthzUnix.pm view on Meta::CPAN
sub _access {
my ($username, $perms, $uid, $gid, $method) = @_;
my ($u, $g, $o) = ($perms & 0700, $perms & 0070, $perms & 0007);
my $user = getpwnam($username);
my %in_group = map { $_ => 1 } @{ getgrgid($gid)->members };
my $bit = $method =~ /(PUT|DELETE)/ ? 2 : 4;
return 1 if $o & $bit
|| ($uid == $user->uid and $u & ($bit << 6))
|| (($gid == $user->gid or $in_group{$username})
and $g & ($bit << 3));
lib/Apache/AuthzUnix.pm view on Meta::CPAN
directories, but probably has other uses in the C<UserDir> space.
Assuming that Apache has authenticated a user, this module helps to
determine whether or not that user can read (or write) a file on the
filesystem. It applies standard Unix user and group tests on the file's
permissions to determine read access and, in the case of C<PUT> and
C<DELETE> methods, write access. If the file does not exist, then the
containing directory is tested, as one would expect.
This module is designed work on both mod_perl versions 1 and 2.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/AxKit/Plugin/Param/Expr.pm view on Meta::CPAN
use Apache::Request;
sub handler {
my $r = shift;
my @param = $r->dir_config->get('AxParamExpr');
$r->pnotes('INPUT',{}) unless $r->pnotes('INPUT');
my $apr = Apache::Request->instance($r);
while (@param > 1) {
my $val = eval($param[-1]);
AxKit::Debug(5,"param '$param[-2]': ($param[-1]) = $val");
throw Apache::AxKit::Exception::Error(-text => "AxParamExpr '$param[-2]': $@") if $@;
$val = '' if !defined $val;
$r->pnotes('INPUT')->{$param[-2]} = $val;
$apr->param($param[-2],$val);
pop @param;
pop @param;
}
my $key = '';
lib/Apache/AxKit/Plugin/Param/Expr.pm view on Meta::CPAN
while (@param > 1) {
my $val = eval($param[-1]);
AxKit::Debug(5,"param '$param[-2]': ($param[-1]) = $val");
throw Apache::AxKit::Exception::Error(-text => "AxCacheParamExpr '$param[-2]': $@") if $@;
$val = '' if !defined $val;
$r->pnotes('INPUT')->{$param[-2]} = $val;
$apr->param($param[-2],$val);
$key .= '|'.$val;
pop @param;
pop @param;
}
@param = $r->dir_config->get('AxCacheExpr');
while (@param) {
my $val = $r->pnotes('INPUT')->{$param[0]};
AxKit::Debug(5,"param '$param[0]': () = $val");
throw Apache::AxKit::Exception::Error(-text => "AxCacheExpr '$param[0]': $@") if $@;
$val = '' if !defined $val;
$key .= '|'.$val;
shift @param;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/AxKit/Plugin/Session.pm view on Meta::CPAN
$self->debug(3,"======= save_params(".join(',',@_).")");
my $r = Apache->request();
parse_input(1);
$uri = new URI($uri);
$uri->query_form(%{$r->pnotes('INPUT')||{}});
return $uri->as_string;
}
# ____ End of save_params ____
# restore args of original request in $r->pnotes('INPUT')
#=======================
sub orig_restore_params ($) {
#-----------------------
my ($self) = @_;
$self->debug(3,"======= restore_params(".join(',',@_).")");
lib/Apache/AxKit/Plugin/Session.pm view on Meta::CPAN
while ($r->prev) {
$r = $r->prev;
$r = $r->main || $r;
}
if ($r->pnotes('INPUT') && $r ne $or) {
$or->pnotes('INPUT',$r->pnotes('INPUT'));
$or->pnotes('UPLOADS',$r->pnotes('UPLOADS'));
$or->pnotes('COOKIES',$r->pnotes('COOKIES'));
$or->pnotes('COOKIES',{}) unless $or->pnotes('COOKIES');
return;
}
lib/Apache/AxKit/Plugin/Session.pm view on Meta::CPAN
$or->pnotes('COOKIES',\%cookies);
$r->pnotes('COOKIES',$or->pnotes('COOKIES')) if ($r ne $or);
# avoid parsing the input so later modules can modify it
return if (!$full);
return if $r->pnotes('INPUT');
# from Apache::RequestNotes
my $maxsize = $r->dir_config('MaxPostSize') || 1024;
my $uploads = $r->dir_config('DisableUploads') =~ m/Off/i ? 0 : 1;
my $apr = Apache::Request->instance($r,
POST_MAX => $maxsize,
DISABLE_UPLOADS => $uploads,
);
$r->pnotes('INPUT',$apr->parms);
$r->pnotes('UPLOADS',[ $apr->upload ]);
if ($r ne $or) {
$or->pnotes('INPUT',$r->pnotes('INPUT'));
$or->pnotes('UPLOADS',$r->pnotes('UPLOADS'));
}
}
# ____ End of parse_input ____
lib/Apache/AxKit/Plugin/Session.pm view on Meta::CPAN
$mr = $mr->prev;
$mr = $mr->main || $mr;
}
$mr = $mr->main || $mr;
$r->pnotes('INPUT')->{'url'} = $1 if ($r->uri =~ m{^/[a-z]+(/.*)$});
$r->pnotes('INPUT')->{'url'} =~ s{^/([a-z0-9]+://)}{$1};
if (!$r->header_out('Location') && (!$r->prev || !$r->prev->header_out('Location')) && !$r->pnotes('INPUT')->{'url'}) {
$self->debug(1,'called without location header or url paramater');
return SERVER_ERROR;
}
my $session = $r->notes('SESSION_URLPREFIX') || $mr->notes('SESSION_URLPREFIX') || '';
my $uri;
$uri = Apache::URI->parse($r, $r->header_out('Location') || ($r->prev?$r->prev->header_out('Location'):undef) || $r->pnotes('INPUT')->{'url'});
if (!$uri->hostname) {
$uri->hostname($r->hostname);
$uri->port($r->get_server_port);
}
$self->debug(6,"Session: $session, uri: ".$uri->unparse);
lib/Apache/AxKit/Plugin/Session.pm view on Meta::CPAN
$self->debug(3,"======= login(".join(',',@_).")");
my $auth_name = $r->auth_name || 'AxKitSession';
my $auth_type = $r->auth_type || __PACKAGE__;
parse_input(1);
my $args = $r->pnotes('INPUT');
$destination = $$args{'destination'} if @_ < 3;
if ($destination) {
$destination = URI->new_abs($destination, $r->uri);
} else {
lib/Apache/AxKit/Plugin/Session.pm view on Meta::CPAN
$self->debug(3,"--------- save_params(".join(',',@_).")");
my $r = Apache->request();
my $session = $r->pnotes('SESSION') || return $self->orig_save_params($uri);
parse_input(1);
my $in = $r->pnotes('INPUT');
my @out = ();
while(my($key,$val) = each %$in) {
push @out, $key, $val;
}
lib/Apache/AxKit/Plugin/Session.pm view on Meta::CPAN
my $out = new Apache::Table($r);
while (@in) {
$out->add($in[0],$in[1]);
shift @in; shift @in;
}
$r->pnotes('INPUT',$out);
delete $$session{'auth_params'};
}
sub _cleanup_session ($$) {
view all matches for this distribution
view release on metacpan or search on metacpan
Backhand.xs view on Meta::CPAN
int
backhand_MAXSERVERS()
CODE:
RETVAL = MAXSERVERS;
OUTPUT:
RETVAL
int
backhand_MAXSESSIONSPERSERVER()
CODE:
RETVAL = MAXSESSIONSPERSERVER;
OUTPUT:
RETVAL
int
backhand_SERVER_TIMEOUT()
CODE:
RETVAL = SERVER_TIMEOUT;
OUTPUT:
RETVAL
SV *
backhand_load_serverstats()
PREINIT:
Backhand.xs view on Meta::CPAN
newSV_magic_c_int(&(serverstats[i].tatime)), 0);
av_push(statsa, newRV((SV *)statsh));
}
RETVAL = newRV_noinc((SV *)statsa);
OUTPUT:
RETVAL
SV *
backhand_load_personal_arriba()
CODE:
RETVAL = newRV(newSV_magic_c_int(&mod_backhand_personal_arriba));
OUTPUT:
RETVAL
view all matches for this distribution
view release on metacpan or search on metacpan
done implicitely. The configuration is taken from the Apache
configuration file(s).
# print table of users who match the given parameter
<?INTERFACE INPUT="$search_name">
<HTML>
<HEAD><TITLE>tiny litte CIPP example</TITLE></HEAD>
<BODY>
<H1>Users matching '$search_name'</H1>
view all matches for this distribution
view release on metacpan or search on metacpan
t/httpd02.answer view on Meta::CPAN
reference 1-1-2-50 Apache::ConfigParser::Directive=HASH key 'mother'
SEEN reference 1-0 Apache::ConfigParser::Directive=HASH
reference 1-1-2-50 Apache::ConfigParser::Directive=HASH key 'name'
'ifdefine'
reference 1-1-2-50 Apache::ConfigParser::Directive=HASH key 'orig_value'
'HAVE_PUT'
reference 1-1-2-50 Apache::ConfigParser::Directive=HASH key 'orig_value_array'
reference 1-1-2-51-2 ARRAY with 1 elements
reference 1-1-2-51-2 ARRAY index 0
'HAVE_PUT'
reference 1-1-2-50 Apache::ConfigParser::Directive=HASH key 'value'
'HAVE_PUT'
reference 1-1-2-50 Apache::ConfigParser::Directive=HASH key 'value_array'
reference 1-1-2-51-3 ARRAY with 1 elements
reference 1-1-2-51-3 ARRAY index 0
'HAVE_PUT'
reference 1-1-1 ARRAY index 51
reference 1-1-2-51 Apache::ConfigParser::Directive=HASH with 10 keys
reference 1-1-2-51 Apache::ConfigParser::Directive=HASH key 'attributes'
reference 1-1-2-52-0 HASH with 0 keys
reference 1-1-2-51 Apache::ConfigParser::Directive=HASH key 'daughters'
t/httpd02.answer view on Meta::CPAN
reference 1-1-2-89 Apache::ConfigParser::Directive=HASH key 'mother'
SEEN reference 1-0 Apache::ConfigParser::Directive=HASH
reference 1-1-2-89 Apache::ConfigParser::Directive=HASH key 'name'
'ifdefine'
reference 1-1-2-89 Apache::ConfigParser::Directive=HASH key 'orig_value'
'HAVE_PUT'
reference 1-1-2-89 Apache::ConfigParser::Directive=HASH key 'orig_value_array'
reference 1-1-2-90-2 ARRAY with 1 elements
reference 1-1-2-90-2 ARRAY index 0
'HAVE_PUT'
reference 1-1-2-89 Apache::ConfigParser::Directive=HASH key 'value'
'HAVE_PUT'
reference 1-1-2-89 Apache::ConfigParser::Directive=HASH key 'value_array'
reference 1-1-2-90-3 ARRAY with 1 elements
reference 1-1-2-90-3 ARRAY index 0
'HAVE_PUT'
reference 1-1-1 ARRAY index 90
reference 1-1-2-90 Apache::ConfigParser::Directive=HASH with 10 keys
reference 1-1-2-90 Apache::ConfigParser::Directive=HASH key 'attributes'
reference 1-1-2-91-0 HASH with 0 keys
reference 1-1-2-90 Apache::ConfigParser::Directive=HASH key 'daughters'
t/httpd02.answer view on Meta::CPAN
reference 1-1-2-130-2-5-2-3 Apache::ConfigParser::Directive=HASH key 'mother'
SEEN reference 1-1-2-130-2-4 Apache::ConfigParser::Directive=HASH
reference 1-1-2-130-2-5-2-3 Apache::ConfigParser::Directive=HASH key 'name'
'limit'
reference 1-1-2-130-2-5-2-3 Apache::ConfigParser::Directive=HASH key 'orig_value'
'GET PUT MOVE DELETE'
reference 1-1-2-130-2-5-2-3 Apache::ConfigParser::Directive=HASH key 'orig_value_array'
reference 1-1-2-130-2-5-2-4-2 ARRAY with 4 elements
reference 1-1-2-130-2-5-2-4-2 ARRAY index 0
'GET'
reference 1-1-2-130-2-5-2-4-2 ARRAY index 1
'PUT'
reference 1-1-2-130-2-5-2-4-2 ARRAY index 2
'MOVE'
reference 1-1-2-130-2-5-2-4-2 ARRAY index 3
'DELETE'
reference 1-1-2-130-2-5-2-3 Apache::ConfigParser::Directive=HASH key 'value'
'GET PUT MOVE DELETE'
reference 1-1-2-130-2-5-2-3 Apache::ConfigParser::Directive=HASH key 'value_array'
reference 1-1-2-130-2-5-2-4-3 ARRAY with 4 elements
reference 1-1-2-130-2-5-2-4-3 ARRAY index 0
'GET'
reference 1-1-2-130-2-5-2-4-3 ARRAY index 1
'PUT'
reference 1-1-2-130-2-5-2-4-3 ARRAY index 2
'MOVE'
reference 1-1-2-130-2-5-2-4-3 ARRAY index 3
'DELETE'
reference 1-1-2-130-2-5-1 ARRAY index 4
view all matches for this distribution