view release on metacpan or search on metacpan
inc/Module/Install/Can.pm view on Meta::CPAN
*ExtUtils::MM_Cygwin::maybe_command = sub {
my ($self, $file) = @_;
if ($file =~ m{^/cygdrive/}i and ExtUtils::MM_Win32->can('maybe_command')) {
ExtUtils::MM_Win32->maybe_command($file);
} else {
ExtUtils::MM_Unix->maybe_command($file);
}
}
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
Porttracker/protocol.pod view on Meta::CPAN
The API uses a tcp connection to port 55 on the porttracker management
machine. The TCP connection must be 8-bit-clean (as UTF-8 is used as
character encoding) and can be driven either in binary or text mode.
Alternatively, the server also listens on the Unix socket
F</tmp/.tawny/.tawnyd> for local connections (where "none" is one of the
guaranteed auth methods).
There are currently no timeouts for the connection itself, but TCP
keepalive might be enabled server-side.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/ProcessPool/Util.pm view on Meta::CPAN
# Modifications:
# * Use $^O in place of an input argument
# * Return number instead of string
#-------------------------------------------------------------------------------
sub cpu_count {
# Only *nixy osses need this, so use ':'
local $ENV{PATH} = "$ENV{PATH}:/usr/sbin:/sbin";
my $cpus = "?";
OS_CHECK: {
local $_ = $^O;
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Can.pm view on Meta::CPAN
*ExtUtils::MM_Cygwin::maybe_command = sub {
my ($self, $file) = @_;
if ($file =~ m{^/cygdrive/}i and ExtUtils::MM_Win32->can('maybe_command')) {
ExtUtils::MM_Win32->maybe_command($file);
} else {
ExtUtils::MM_Unix->maybe_command($file);
}
}
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Can.pm view on Meta::CPAN
*ExtUtils::MM_Cygwin::maybe_command = sub {
my ($self, $file) = @_;
if ($file =~ m{^/cygdrive/}i and ExtUtils::MM_Win32->can('maybe_command')) {
ExtUtils::MM_Win32->maybe_command($file);
} else {
ExtUtils::MM_Unix->maybe_command($file);
}
}
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/AutoInstall.pm view on Meta::CPAN
$file .= '.pm';
foreach my $dir ( @INC ) {
next if ref $dir;
my $path = File::Spec->catfile($dir, $file);
next unless -e $path;
require ExtUtils::MM_Unix;
return ExtUtils::MM_Unix->parse_version($path);
}
return undef;
}
# Load CPAN.pm and it's configuration
view all matches for this distribution
view release on metacpan or search on metacpan
xt/author/eol.t view on Meta::CPAN
my @files = (
'lib/AnyEvent/RabbitMQ/Simple.pm',
't/00-compile.t'
);
eol_unix_ok($_, { trailing_whitespace => 1 }) foreach @files;
done_testing;
view all matches for this distribution
view release on metacpan or search on metacpan
bin/rltelnet view on Meta::CPAN
use AnyEvent;
use AnyEvent::Socket;
use AnyEvent::ReadLine::Gnu;
@ARGV >= 1
or die "Usage: $0 host:port (e.g. 127.0.0.1:8888 or unix/:/tmp/aedebug)\n";
my ($host, $service) = parse_hostport $ARGV[0], $ARGV[1]
or die "$ARGV[0]: unable to parse destination address and port\n";
my ($fh, $peerhost, $peerport) = do {
bin/rltelnet view on Meta::CPAN
=head1 SYNOPSIS
rltelnet www.nethype,de:80
rltelnet www.google.com 80
rltelnet unix/ /path/to/socket
=head1 DESCRIPTION
This program connects to a socket using AnyEvent::Socket::tcp_connect, prints
everything it receives from the socket and offers a readline editing interface
to send lines to the socket.
This is very remotely what telnet does when used on a non-telnet socket,
except that it uses readline and supports more types of socketsd (e.g.
unix domain sockets).
=head1 AUTHOR, CONTACT, SUPPORT
Marc Lehmann <schmorp@schmorp.de>
http://software.schmorp.de/pkg/AnyEvent-ReadLine-Gnu.html
view all matches for this distribution
view release on metacpan or search on metacpan
examples/unix_socket.pl view on Meta::CPAN
my $cv = AE::cv();
my $redis;
$redis = AnyEvent::Redis::RipeRedis->new(
host => 'unix/',
port => '/var/run/redis/redis.sock',
password => 'redis_pass',
connection_timeout => 5,
read_timeout => 5,
min_reconnect_interval => 5,
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Can.pm view on Meta::CPAN
*ExtUtils::MM_Cygwin::maybe_command = sub {
my ($self, $file) = @_;
if ($file =~ m{^/cygdrive/}i and ExtUtils::MM_Win32->can('maybe_command')) {
ExtUtils::MM_Win32->maybe_command($file);
} else {
ExtUtils::MM_Unix->maybe_command($file);
}
}
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Can.pm view on Meta::CPAN
*ExtUtils::MM_Cygwin::maybe_command = sub {
my ($self, $file) = @_;
if ($file =~ m{^/cygdrive/}i and ExtUtils::MM_Win32->can('maybe_command')) {
ExtUtils::MM_Win32->maybe_command($file);
} else {
ExtUtils::MM_Unix->maybe_command($file);
}
}
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
examples/unix_socket.pl view on Meta::CPAN
my $cv = AE::cv;
my $redis;
$redis = AnyEvent::RipeRedis->new(
host => 'unix/',
port => '/var/run/redis/redis.sock',
password => 'redis_pass',
connection_timeout => 5,
read_timeout => 5,
reconnect_interval => 5,
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/Run.pm view on Meta::CPAN
AnyEvent::Run is a subclass of L<AnyEvent::Handle>, so reading it's
documentation first is recommended.
This module is designed to run a child process, using an explicit
command line, a class name, or a coderef. It should work on any
Unix system as well as Windows 2000 and higher.
For an alternate way of running a coderef in a forked process using
AnyEvent, see L<AnyEvent::Util>'s fork_call function.
=head1 METHODS
=head2 $handle = new( %args )
Creates and returns a new AnyEvent::Run object. The process forks and either
execs (Unix) or launches a new process (Windows). If using a coderef, the
coderef is run in the forked process.
The process's STDIN, STDOUT, and STDERR and connected to $handle->{fh}.
The child process is automatically killed if the AnyEvent::Run object goes out
lib/AnyEvent/Run.pm view on Meta::CPAN
Optional. When using class, instead of calling main(), the given method will
be called.
=item priority
Optional. A numeric value between -19 and 19. On Unix, you must be root
to change the priority to a value less than 0. On Windows, these
values are mapped to the following priority levels:
-19 to -16 High
-15 to -6 Above Normal
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Can.pm view on Meta::CPAN
*ExtUtils::MM_Cygwin::maybe_command = sub {
my ($self, $file) = @_;
if ($file =~ m{^/cygdrive/}i and ExtUtils::MM_Win32->can('maybe_command')) {
ExtUtils::MM_Win32->maybe_command($file);
} else {
ExtUtils::MM_Unix->maybe_command($file);
}
}
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/AutoInstall.pm view on Meta::CPAN
$file .= '.pm';
foreach my $dir ( @INC ) {
next if ref $dir;
my $path = File::Spec->catfile($dir, $file);
next unless -e $path;
require ExtUtils::MM_Unix;
return ExtUtils::MM_Unix->parse_version($path);
}
return undef;
}
# Load CPAN.pm and it's configuration
view all matches for this distribution
view release on metacpan or search on metacpan
t/negative-one.t view on Meta::CPAN
my $done = AnyEvent::Subprocess::Done->new(
exit_status => -1,
);
TODO: {
local $TODO = 'different behavior on different unix flavors';
is $done->exit_value, 255, '255 exit value';
}
is $done->exit_signal, 0, 'no signal';
ok !$done->exited, 'exited normally';
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Can.pm view on Meta::CPAN
*ExtUtils::MM_Cygwin::maybe_command = sub {
my ($self, $file) = @_;
if ($file =~ m{^/cygdrive/}i and ExtUtils::MM_Win32->can('maybe_command')) {
ExtUtils::MM_Win32->maybe_command($file);
} else {
ExtUtils::MM_Unix->maybe_command($file);
}
}
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/Sway.pm view on Meta::CPAN
sub connect
{
my ($self) = @_;
my $cv = AnyEvent->condvar;
tcp_connect "unix/", $self->{path}, sub {
my ($fh) = @_;
return $cv->send(0) unless $fh;
$self->{ipchdl} = AnyEvent::Handle->new(
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/Task.pm view on Meta::CPAN
use Authen::Passphrase::BlowfishCrypt;
my $dev_urandom;
my $server = AnyEvent::Task::Server->new(
name => 'passwd-hasher',
listen => ['unix/', '/tmp/anyevent-task.socket'],
setup => sub {
open($dev_urandom, "/dev/urandom") || die "open urandom: $!";
},
interface => {
hash => sub {
lib/AnyEvent/Task.pm view on Meta::CPAN
=head2 Client
use AnyEvent::Task::Client;
my $client = AnyEvent::Task::Client->new(
connect => ['unix/', '/tmp/anyevent-task.socket'],
);
my $checkout = $client->checkout( timeout => 5, );
my $cv = AE::cv;
lib/AnyEvent/Task.pm view on Meta::CPAN
my $dbh;
AnyEvent::Task::Server->new(
name => 'dbi',
listen => ['unix/', '/tmp/anyevent-task.socket'],
setup => sub {
$dbh = DBI->connect("dbi:SQLite:dbname=/tmp/junk.sqlite3","","",{ RaiseError => 1, });
},
interface => sub {
my ($method, @args) = @_;
lib/AnyEvent/Task.pm view on Meta::CPAN
=head2 Client
use AnyEvent::Task::Client;
my $client = AnyEvent::Task::Client->new(
connect => ['unix/', '/tmp/anyevent-task.socket'],
);
my $dbh = $client->checkout;
my $cv = AE::cv;
lib/AnyEvent/Task.pm view on Meta::CPAN
Since it's more of a bother than it's worth to run the server and the client in the same process, there is an alternate server constructor, C<AnyEvent::Task::Server::fork_task_server> for when you'd like to fork a dedicated server process. It can be ...
## my ($keepalive_pipe, $server_pid) =
AnyEvent::Task::Server::fork_task_server(
name => 'hello',
listen => ['unix/', '/tmp/anyevent-task.socket'],
interface => sub {
return "Hello from PID $$";
},
);
lib/AnyEvent/Task.pm view on Meta::CPAN
use AnyEvent::Task::Server;
use AnyEvent::Task::Logger;
AnyEvent::Task::Server->new(
name => 'sleeper',
listen => ['unix/', '/tmp/anyevent-task.socket'],
interface => sub {
logger->info('about to compute some operation');
{
my $timer = logger->timer('computing some operation');
select undef,undef,undef, 1; ## sleep for 1 second
lib/AnyEvent/Task.pm view on Meta::CPAN
use AnyEvent::Task::Client;
use Log::Defer;
my $client = AnyEvent::Task::Client->new(
connect => ['unix/', '/tmp/anyevent-task.socket'],
);
my $log_defer_object = Log::Defer->new(sub {
my $msg = shift;
use Data::Dumper; ## or whatever
lib/AnyEvent/Task.pm view on Meta::CPAN
In order to handle exceptions in a meaningful way with this module, you must use L<Callback::Frame>. In order to maintain seamless request logging across clients and workers, you should use L<Log::Defer>.
There are many modules on CPAN similar to L<AnyEvent::Task>.
This module is designed to be used in a non-blocking, process-based unix program. Depending on your exact requirements you might find something else useful: L<Parallel::ForkManager>, L<Thread::Pool>, or an HTTP server of some kind.
If you're into AnyEvent, L<AnyEvent::DBI> and L<AnyEvent::Worker> (based on AnyEvent::DBI), L<AnyEvent::ForkObject>, and L<AnyEvent::Fork::RPC> send and receive commands from worker processes similar to this module. L<AnyEvent::Worker::Pool> also has...
If you're into POE there is L<POE::Component::Pool::DBI>, L<POEx::WorkerPool>, L<POE::Component::ResourcePool>, L<POE::Component::PreforkDispatch>, L<Cantella::Worker>.
lib/AnyEvent/Task.pm view on Meta::CPAN
! docs: write good error handling examples
Make names more consistent between callback::frame backtraces and auto-generated log::defer timers
make server not use AnyEvent so don't have to worry about workers unlinking unix socket in dtors
In a graceful shutdown scenario, servers wait() on all their children before terminating.
- Support relinquishing accept() socket during this period?
Document hung_worker_timeout and SIGALRM stuff
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Can.pm view on Meta::CPAN
*ExtUtils::MM_Cygwin::maybe_command = sub {
my ($self, $file) = @_;
if ($file =~ m{^/cygdrive/}i and ExtUtils::MM_Win32->can('maybe_command')) {
ExtUtils::MM_Win32->maybe_command($file);
} else {
ExtUtils::MM_Unix->maybe_command($file);
}
}
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/WebSocket/Client.pm view on Meta::CPAN
You can override the connection host and port by passing them in as the
second and third argument. These values (if provided) are passed directly
into L<AnyEvent::Socket>'s C<tcp_connect> function, so please note that
function's idiosyncrasies in the L<AnyEvent::Socket> documentation. In
particular, you can pass in C<unix/> as the host and a filesystem path
as the "port" to connect to a unix domain socket.
This method will return an L<AnyEvent> condition variable which you can
attach a callback to. The value sent through the condition variable will
be either an instance of L<AnyEvent::WebSocket::Connection> or a croak
message indicating a failure. The synopsis above shows how to catch
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Can.pm view on Meta::CPAN
*ExtUtils::MM_Cygwin::maybe_command = sub {
my ($self, $file) = @_;
if ($file =~ m{^/cygdrive/}i and ExtUtils::MM_Win32->can('maybe_command')) {
ExtUtils::MM_Win32->maybe_command($file);
} else {
ExtUtils::MM_Unix->maybe_command($file);
}
}
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/XMPP/Util.pm view on Meta::CPAN
}
=item B<xmpp_datetime_as_timestamp ($string)>
This function takes the same arguments as C<from_xmpp_datetime>, but returns a
unix timestamp, like C<time ()> would.
This function requires the L<POSIX> module.
=cut
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Can.pm view on Meta::CPAN
*ExtUtils::MM_Cygwin::maybe_command = sub {
my ($self, $file) = @_;
if ($file =~ m{^/cygdrive/}i and ExtUtils::MM_Win32->can('maybe_command')) {
ExtUtils::MM_Win32->maybe_command($file);
} else {
ExtUtils::MM_Unix->maybe_command($file);
}
}
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Can.pm view on Meta::CPAN
*ExtUtils::MM_Cygwin::maybe_command = sub {
my ($self, $file) = @_;
if ($file =~ m{^/cygdrive/}i and ExtUtils::MM_Win32->can('maybe_command')) {
ExtUtils::MM_Win32->maybe_command($file);
} else {
ExtUtils::MM_Unix->maybe_command($file);
}
}
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Can.pm view on Meta::CPAN
*ExtUtils::MM_Cygwin::maybe_command = sub {
my ($self, $file) = @_;
if ($file =~ m{^/cygdrive/}i and ExtUtils::MM_Win32->can('maybe_command')) {
ExtUtils::MM_Win32->maybe_command($file);
} else {
ExtUtils::MM_Unix->maybe_command($file);
}
}
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Can.pm view on Meta::CPAN
*ExtUtils::MM_Cygwin::maybe_command = sub {
my ($self, $file) = @_;
if ($file =~ m{^/cygdrive/}i and ExtUtils::MM_Win32->can('maybe_command')) {
ExtUtils::MM_Win32->maybe_command($file);
} else {
ExtUtils::MM_Unix->maybe_command($file);
}
}
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Can.pm view on Meta::CPAN
*ExtUtils::MM_Cygwin::maybe_command = sub {
my ($self, $file) = @_;
if ($file =~ m{^/cygdrive/}i and ExtUtils::MM_Win32->can('maybe_command')) {
ExtUtils::MM_Win32->maybe_command($file);
} else {
ExtUtils::MM_Unix->maybe_command($file);
}
}
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
# if the $file is an absolute path, then just return the file
# if the $file is a relative path, concat it with the passed in directory
sub AbsPath {
my($file, $dir) = @_;
# we test for first unix style and then win32 style path conventions
if($file =~ m|^/| or $file =~ m|^.\:|) {
$file;
} else {
# we only can absolute the path if the directory path is absolute
if($dir =~ m|^/| or $dir =~ m|^.\:|) {
# LastModified calculations
if(defined $last_modified) {
if($last_modified !~ /^\d+$/) {
my $old_last_modified = $last_modified;
$last_modified = &Apache::ASP::Date::str2time($last_modified);
$self->{dbg} && $self->Debug("converting string date for LastModified $old_last_modified to unix time $last_modified");
}
if($last_modified < 0) {
$self->{dbg} && $self->Debug("negative LastModified $last_modified ignored");
$last_modified = undef;
}
the source distribution.
=head1 INSTALL
The installation process for Apache::ASP is geared towards those
with experience with Perl, Apache, and unix systems. For those
without this experience, please understand that the learning curve
can be significant. But what you have at the end will be a web site
running on superior open source software.
If installing onto a Windows operating system, please see the section
=item InodeNames
Default 0. Set to 1 to uses a stat() call on scripts and includes to
derive subroutine namespace based on device and inode numbers. In case of
multiple symbolic links pointing to the same script this will result
in the script being compiled only once. Use only on unix flavours
which support the stat() call that know about device and inode
numbers.
PerlSetVar InodeNames 1
"Tuesday, 08-Feb-94 14:15:29 GMT" -- old rfc850 HTTP format
"08-Feb-94" -- old rfc850 HTTP format
"09 Feb 1994" -- proposed new HTTP format
"Feb 3 1994" -- Unix 'ls -l' format
"Feb 3 17:03" -- Unix 'ls -l' format
=item $Response->{FormFill} = 0|1
If true, HTML forms generated by the script output will
be auto filled with data from $Request->Form. This feature
=item Standalone CGI Mode, without mod_perl
As of version 2.19, Apache::ASP scripts may be run as standalone
CGI scripts without mod_perl being loaded into Apache. Work
to date has only been done with mod_cgi scripts under Apache on a
Unix platform, and it is unlikely to work under other web servers
or Win32 operating systems without further development.
To run the ./site/eg scripts as CGI scripts, you copy the
./site directory to some location accessible by your web
server, in this example its /usr/local/apache/htdocs/aspcgi,
:) Lincoln Stein, for his blessed CGI.pm module
:) Michael Rothwell, for his love of Session hacking
:) Francesco Pasqualini, for bringing ASP to CGI
:) Bryan Murphy, for being a PerlScript wiz
:) Lupe Christoph, for his immaculate and stubborn testing skills
:) Ryan Whelan, for boldly testing on Unix in the early infancy of ASP
=head1 SUPPORT
=head2 COMMUNITY
+PerlSetVar InodeNames 1 config which will compile scripts hashed by
their device & inode identifiers, from a stat($file)[0,1] call.
This allows for script directories, the Global directory,
and IncludesDir directories to be symlinked to without
recompiling identical scripts. Likely only works on Unix
systems. Thanks to Ime Smits for this one.
+Streamlined code internally so that includes & scripts were
compiled by same code. This is a baby step toward fusing
include & script code compilation models, leading to being
- Domain cookie key now works
: Expire times now taken from time(), and relative time in sec
: Request->Cookies() reading more flexible, with wantarray()
on hash cookie values, %hash = $Request->Cookie('test');
-make test module naming correction, was t.pm, now T.pm for Unix
+POD / README cleanup, formatting and HTML friendly.
=item $VERSION = 0.03; $DATE="09/14/1998";
view all matches for this distribution
view release on metacpan or search on metacpan
t/httpd.conf-dist view on Meta::CPAN
# can find its configuration files.
#
#
# ServerType is either inetd, or standalone. Inetd mode is only supported on
# Unix platforms.
#
ServerType standalone
#
# ServerRoot: The top of the directory tree under which the server's
t/httpd.conf-dist view on Meta::CPAN
# In the standard configuration, the server will process this file,
# srm.conf, and access.conf in that order. The latter two files are
# now distributed empty, as it is recommended that all directives
# be kept in a single file for simplicity. The commented-out values
# below are the built-in defaults. You can have the server ignore
# these files altogether by using "/dev/null" (for Unix) or
# "nul" (for Win32) for the arguments to the directives.
#
#ResourceConfig conf/srm.conf
#AccessConfig conf/access.conf
view all matches for this distribution