view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
use 5.004;
use strict 'vars';
use vars qw{$VERSION};
BEGIN {
# All Module::Install core packages now require synchronised versions.
# This will be used to ensure we don't accidentally load old or
# different versions of modules.
# This is not enforced yet, but will be some time in the next few
# releases once we can make sure it won't clash with custom
# Module::Install extensions.
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
use File::Find ();
use File::Path ();
use vars qw{$VERSION $MAIN};
BEGIN {
# All Module::Install core packages now require synchronised versions.
# This will be used to ensure we don't accidentally load old or
# different versions of modules.
# This is not enforced yet, but will be some time in the next few
# releases once we can make sure it won't clash with custom
# Module::Install extensions.
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
use File::Find ();
use File::Path ();
use vars qw{$VERSION $MAIN};
BEGIN {
# All Module::Install core packages now require synchronised versions.
# This will be used to ensure we don't accidentally load old or
# different versions of modules.
# This is not enforced yet, but will be some time in the next few
# releases once we can make sure it won't clash with custom
# Module::Install extensions.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Cache/KyotoTycoon.pm view on Meta::CPAN
my ($code, $body, $msg) = $self->{client}->call('clear', \%args);
Carp::croak _errmsg($code, $msg) unless $code eq 200;
return;
}
sub synchronize {
my ($self, $hard, $command) = @_;
my %args = (DB => $self->db);
$args{hard} = $hard if $hard;
$args{command} = $command if defined $command;
my ($code, $body, $msg) = $self->{client}->call('synchronize', \%args);
return 1 if $code eq 200;
return 0 if $code eq 450;
Carp::croak _errmsg($code, $msg);
}
lib/Cache/KyotoTycoon.pm view on Meta::CPAN
Remove all elements for the storage.
I<Return>: Not a useful value.
=item C<< $kt->synchronize($hard:Bool, $command); >>
Synchronize database with file system.
I<$hard>: call fsync() or not.
I<$command>: call $command in synchronization state.
I<Return>: 1 if succeeded, 0 if $command returns false.
=item C<< $kt->set($key, $value, $xt); >>
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
use File::Find ();
use File::Path ();
use vars qw{$VERSION $MAIN};
BEGIN {
# All Module::Install core packages now require synchronised versions.
# This will be used to ensure we don't accidentally load old or
# different versions of modules.
# This is not enforced yet, but will be some time in the next few
# releases once we can make sure it won't clash with custom
# Module::Install extensions.
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
use File::Find ();
use File::Path ();
use vars qw{$VERSION $MAIN};
BEGIN {
# All Module::Install core packages now require synchronised versions.
# This will be used to ensure we don't accidentally load old or
# different versions of modules.
# This is not enforced yet, but will be some time in the next few
# releases once we can make sure it won't clash with custom
# Module::Install extensions.
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
use 5.004;
use strict 'vars';
use vars qw{$VERSION};
BEGIN {
# All Module::Install core packages now require synchronised versions.
# This will be used to ensure we don't accidentally load old or
# different versions of modules.
# This is not enforced yet, but will be some time in the next few
# releases once we can make sure it won't clash with custom
# Module::Install extensions.
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
use 5.005;
use strict 'vars';
use vars qw{$VERSION $MAIN};
BEGIN {
# All Module::Install core packages now require synchronised versions.
# This will be used to ensure we don't accidentally load old or
# different versions of modules.
# This is not enforced yet, but will be some time in the next few
# releases once we can make sure it won't clash with custom
# Module::Install extensions.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Cache/Memcached/Turnstile.pm view on Meta::CPAN
all front-ends that rely on the cacheL<[1]|/"Footnotes">.
=item 2
A normal web environment has rather friendly, randomized access
patterns. But if your cache has a number of near-synchronized
clients that all attempt to access a new cache key in unison
(such as when a second or a minute roll around), then some of the
mechanisms that can help in situation 1 break down.
=back
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
use File::Find ();
use File::Path ();
use vars qw{$VERSION $MAIN};
BEGIN {
# All Module::Install core packages now require synchronised versions.
# This will be used to ensure we don't accidentally load old or
# different versions of modules.
# This is not enforced yet, but will be some time in the next few
# releases once we can make sure it won't clash with custom
# Module::Install extensions.
view all matches for this distribution
view release on metacpan or search on metacpan
can be useful to only search the underlying data once for each required key.
=item write (undef)
Provides a code reference to a routine which will write cache entries into the
underlying data. This routine will be called by write(), to synchronise the
underlying data with the cache. Called as C<$write-E<gt>($key,$val,$context)>.
If the routine is not provided, the underlying data will not be synchronised
after cache writes.
=item writethrough (1)
If true, the C<write> routine above will be called as soon as
write() is called. This provides immediate synchronisation of
underlying data and cache contents.
If false, the C<write> routine will
be called for each cache entry which no longer fits in its bucket after a
cache read or write. This provides a write-as-necessary behaviour, which may
=item delete (undef)
Provides a code reference to a routine which will delete items from the
underlying data. This routine will be called by delete(),
to synchronise the underlying data with the cache. Called as
C<$delete-E<gt>($key,$cval,$context)>, where C<$cval> is the value
currently stored in the cache. If this routine is not provided, entries
deleted from the cache have no effect on the underlying data.
=back
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
use 5.004;
use strict 'vars';
use vars qw{$VERSION};
BEGIN {
# All Module::Install core packages now require synchronised versions.
# This will be used to ensure we don't accidentally load old or
# different versions of modules.
# This is not enforced yet, but will be some time in the next few
# releases once we can make sure it won't clash with custom
# Module::Install extensions.
view all matches for this distribution
view release on metacpan or search on metacpan
? dbi tests should look for a config file (from previous install) ?
html-mason-util.t (use HTML::Mason::Tests, hmc)
xml-comma-util.t
misc.t (_log... makekey, md5path, etc... misc from Static.pm)
-- read old/write asynchronous option
-- cleanup:
extension/wrapper thing could be cleaner
change way extensions work -> if possible, translate to a file
dependency, instead of checking the dependency in the extension.
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
}
use strict 'vars';
use vars qw{$VERSION};
BEGIN {
# All Module::Install core packages now require synchronised versions.
# This will be used to ensure we don't accidentally load old or
# different versions of modules.
# This is not enforced yet, but will be some time in the next few
# releases once we can make sure it won't clash with custom
# Module::Install extensions.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Calendar/Julian.pm view on Meta::CPAN
Days are considered to begin at midnight.
In the Julian calendar the average year has a length of 365.25 days. compared to
the actual solar tropical year of 365.24219878 days.The calendar thus accumulates
one day of error with respect to the solar year every 128 years. Being a purely
solar calendar, no attempt is made to synchronise the start of months to the
phases of the Moon.
+-----------------------------------------------------------------------------------+
| July [2017 BE] |
+-----------+-----------+-----------+-----------+-----------+-----------+-----------+
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Callback/Frame.pm view on Meta::CPAN
}
print $callback->();
will print C<123> even though C<$var> is no longer in scope when the callback is invoked.
Sometimes people call these anonymous functions that reference variables in their surrounding lexical scope "closures". Whatever you call them, they are essential for convenient and efficient asynchronous programming.
For many applications we really like straightforward callback style. The goal of Callback::Frame is to simplify the management of dynamic environments (defined below) while leaving callback style alone.
=head1 DESCRIPTION
lib/Callback/Frame.pm view on Meta::CPAN
B<IMPORTANT NOTE>: All callbacks that may be invoked outside the dynamic environment of the current frame should be created with C<frame> or C<fub> so that the dynamic environment will be correctly re-applied when the callback is invoked.
The C<frame_try> and C<frame_catch> subs are equivalent to a call to C<frame> with C<code> and C<catch> parameters. However, unlike with C<frame>, the frame is executed immediately.
C<frame_void> takes a single callback argument. This can be useful if you wish to kick off an unassociated asynchronous action while handling. If the action is run in void context, there is no way for it to throw an exception that will affect your re...
Libraries that wrap callbacks in frames can use the C<Callback::Frame::is_frame()> function to determine if a given callback is already wrapped in a frame. It returns true if the callback is wrapped in a frame and is therefore suitable for use with C...
if (!Callback::Frame::is_frame($callback)) {
$callback = frame(code => $callback);
lib/Callback/Frame.pm view on Meta::CPAN
=head1 NESTING AND STACK-TRACES
Callback::Frame tries to make adding error handling support to an existing asynchronous application as easy as possible by not forcing you to pass extra parameters around. It should also make life easier because as a side effect of adding error check...
Frames can be nested. When an exception is raised, the most deeply nested C<catch> handler is invoked. If this handler itself throws an error, the next most deeply nested handler is invoked with the new exception but the original stack trace. If the ...
When a C<catch> handler is called, not only is C<$@> set, but also a stack-trace string is passed in as the first argument. All frames will be listed in this stack-trace, starting with the most deeply nested frame.
If you want you can use simple frame names like C<"accepted"> but if you are recording error messages in a log you might find it useful to name your frames things like C<"accepted connection from $ip:$port at $time"> and C<"connecting to $host (timeo...
All frames you omit the name from will be shown as C<"ANONYMOUS FRAME"> in stack-traces.
Since multiple frames can be created within the same parent frame and therefore multiple child frames can be active at once, frames aren't necessarily arranged in terms of a stack. Really, the frame "stack" is more of a tree data structure (known in ...
=head1 "LOCAL" VARIABLES
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
use File::Find ();
use File::Path ();
use vars qw{$VERSION $MAIN};
BEGIN {
# All Module::Install core packages now require synchronised versions.
# This will be used to ensure we don't accidentally load old or
# different versions of modules.
# This is not enforced yet, but will be some time in the next few
# releases once we can make sure it won't clash with custom
# Module::Install extensions.
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
use 5.005;
use strict 'vars';
use vars qw{$VERSION $MAIN};
BEGIN {
# All Module::Install core packages now require synchronised versions.
# This will be used to ensure we don't accidentally load old or
# different versions of modules.
# This is not enforced yet, but will be some time in the next few
# releases once we can make sure it won't clash with custom
# Module::Install extensions.
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
use File::Find ();
use File::Path ();
use vars qw{$VERSION $MAIN};
BEGIN {
# All Module::Install core packages now require synchronised versions.
# This will be used to ensure we don't accidentally load old or
# different versions of modules.
# This is not enforced yet, but will be some time in the next few
# releases once we can make sure it won't clash with custom
# Module::Install extensions.
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
use 5.005;
use strict 'vars';
use vars qw{$VERSION $MAIN};
BEGIN {
# All Module::Install core packages now require synchronised versions.
# This will be used to ensure we don't accidentally load old or
# different versions of modules.
# This is not enforced yet, but will be some time in the next few
# releases once we can make sure it won't clash with custom
# Module::Install extensions.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Carrot/Continuity/Coordination/Episode./documentation/Episode-en.pod view on Meta::CPAN
=pod
=head1 NAME
Carrot::Continuity::Coordination::Episode - manage series of asynchronous events
=head1 SYNOPSIS
# See Carrot::Continuity::Coordination::Episode::Synopsis for a longer example
lib/Carrot/Continuity/Coordination/Episode./documentation/Episode-en.pod view on Meta::CPAN
This is an experimental module. It hasn't been thoroughly tested, making the probability of fatal bugs quiet high. The sole goal of the release is to document the current development.
The documentation is not keeping up with the development speed and carries fragments from various stages of development.
In addition to the stage of the development, be warned that there are many competitors, which are much more mature and which might be better suited for your purposes. Namely L<AnyEvent>, L<EV>, L<Event>, L<EventLib>, L<IO::Async>, L<IO-Multiplex>, L...
=head1 DESCRIPTION
Carrot::Continuity::Coordination::Episode provides a rather minimalistic OO interface to asynchronous events, plus those synchronous events which can be directly derived from them. You won't find a general NFA (one which isn't attached to an asynchro...
Delivery is done via method calls only, which implies a double linking between instances. In the following informal code, an instance has to keep a reference to the instance of the next lower step:
$client->connect
$session->request
lib/Carrot/Continuity/Coordination/Episode./documentation/Episode-en.pod view on Meta::CPAN
The double linkage is extra effort, but once done, event programming is easy.
=head2 The Loop
Events can be broadly put into two classes: synchronous and asynchronous. An approximate definition would be that asynchronous events come from outside the running program, and the origin of the synchronous events lie within the program.
The four standard sources for asynchronous events are time, signals, availability of file-like IO and user interaction. These require a so called event loop to be active.
During the event loop the program waits for any of the defined events to happen. In Carrot::Continuity::Coordination::Episode the loop object is monadic, which means that $loop is always the same instance, so you can pull it out anywhere you like.
my $loop = Carrot::Continuity::Coordination::Episode::Loop->constructor;
$loop->run(\$continue_flag); # await asynchronous events
To run the loop, call the method run. It takes one mandatory parameter, which is a scalar reference for loop control. As long as the scalar is true, the loop continues. However, the loop always completes the current round, there is no early break out...
=head1 Targets
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Cassandra/Client.pm view on Meta::CPAN
};
return;
}
sub _mksync { # Translates an asynchronous call into something that looks like Perl
my ($sub)= @_;
return sub {
my $self= shift;
$sub->($self, $self->{async_io}->wait(my $w), @_);
my ($err, @output)= $w->();
lib/Cassandra/Client.pm view on Meta::CPAN
version 0.21
=head1 DESCRIPTION
C<Cassandra::Client> is a Perl library giving its users access to the Cassandra database, through the native protocol. Both synchronous and asynchronous querying is supported, through various common calling styles.
=head1 EXAMPLE
use Cassandra::Client;
my $client= Cassandra::Client->new(
lib/Cassandra/Client.pm view on Meta::CPAN
=back
=head1 (A?)SYNCHRONOUS
It's up to the user to choose which calling style to use: synchronous, asynchronous with promises, or through returned coderefs.
=head2 Synchronous
All C<Cassandra::Client> methods are available as synchronous methods by using their normal names. For example, C<< $client->connect(); >> will block until the client has connected. Similarly, C<< $client->execute($query) >> will wait for the query r...
my $client= Cassandra::Client->new( ... );
$client->connect;
$client->execute("INSERT INTO my_table (id, value) VALUES (?, ?) USING TTL ?",
[ 1, "test", 86400 ],
{ consistency => "quorum" });
=head2 Promises
C<Cassandra::Client> methods are also available as promises (see perldoc L<AnyEvent::XSPromises>). This integrates well with other libraries that deal with promises or asynchronous callbacks. Note that for promises to work, C<AnyEvent> is required, a...
Promise variants are available by prefixing method names with C<async_>, eg. C<async_connect>, C<async_execute>, etc. The usual result of the method is passed to the promise's success handler, or to the failure handler if there was an error.
# Asynchronously pages through the result set, processing data as it comes in.
my $promise= $client->async_each_page("SELECT id, column FROM my_table WHERE id=?", [ 5 ], undef, sub {
for my $row (@{shift->rows}) {
my ($id, $column)= @$row;
say "Row: $id $column";
}
lib/Cassandra/Client.pm view on Meta::CPAN
How you integrate this into your infrastructure is of course up to you, and beyond the scope of the C<Cassandra::Client> documentation.
=head2 Coderefs
These are the simplest form of asynchronous querying in C<Cassandra::Client>. Instead of dealing with complex callback resolution, the client simply returns a coderef that, once invoked, returns what the original method would have retruned.
The variants are available by prefixing method names with C<future_>, eg. C<future_connect>, C<future_execute>, etc. These methods return a coderef.
my $coderef= $client->future_execute("INSERT INTO table (id, value) VALUES (?, ?), [ $id, $value ]);
lib/Cassandra/Client.pm view on Meta::CPAN
...
# Wait for the query to finish
$coderef->();
Upon errors, the coderef will die, just like the synchronous methods would. Because of this, invoking the coderef immediately after getting it is equal to using the synchronous methods :
# This :
$client->connect;
# Is the same as :
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Catalog/mysql/schema.pm view on Meta::CPAN
#
# Rowid of the category
#
category int not null,
#
# External identifier to synchronize with alien catalogs
#
externalid varchar(32) not null default '',
index catalog_entry2category_NAME2 (created),
index catalog_entry2category_NAME3 (modified),
lib/Catalog/mysql/schema.pm view on Meta::CPAN
#
# Total number of records in this category and bellow
#
count int default 0,
#
# External identifier to synchronize with alien catalogs
#
externalid varchar(32) not null default '',
unique catalog_category_NAME1 (rowid),
index catalog_category_NAME2 (created),
lib/Catalog/mysql/schema.pm view on Meta::CPAN
#
# Rowid of child
#
down int not null,
#
# External identifier to synchronize with alien catalogs
#
externalid varchar(32) not null default '',
unique catalog_category2category_NAME1 (rowid),
index catalog_category2category_NAME2 (created),
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
use 5.004;
use strict 'vars';
use vars qw{$VERSION};
BEGIN {
# All Module::Install core packages now require synchronised versions.
# This will be used to ensure we don't accidentally load old or
# different versions of modules.
# This is not enforced yet, but will be some time in the next few
# releases once we can make sure it won't clash with custom
# Module::Install extensions.
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
use File::Find ();
use File::Path ();
use vars qw{$VERSION $MAIN};
BEGIN {
# All Module::Install core packages now require synchronised versions.
# This will be used to ensure we don't accidentally load old or
# different versions of modules.
# This is not enforced yet, but will be some time in the next few
# releases once we can make sure it won't clash with custom
# Module::Install extensions.
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
use File::Find ();
use File::Path ();
use vars qw{$VERSION $MAIN};
BEGIN {
# All Module::Install core packages now require synchronised versions.
# This will be used to ensure we don't accidentally load old or
# different versions of modules.
# This is not enforced yet, but will be some time in the next few
# releases once we can make sure it won't clash with custom
# Module::Install extensions.
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
use 5.005;
use strict 'vars';
use vars qw{$VERSION $MAIN};
BEGIN {
# All Module::Install core packages now require synchronised versions.
# This will be used to ensure we don't accidentally load old or
# different versions of modules.
# This is not enforced yet, but will be some time in the next few
# releases once we can make sure it won't clash with custom
# Module::Install extensions.
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
use 5.005;
use strict 'vars';
use vars qw{$VERSION $MAIN};
BEGIN {
# All Module::Install core packages now require synchronised versions.
# This will be used to ensure we don't accidentally load old or
# different versions of modules.
# This is not enforced yet, but will be some time in the next few
# releases once we can make sure it won't clash with custom
# Module::Install extensions.
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
use File::Find ();
use File::Path ();
use vars qw{$VERSION $MAIN};
BEGIN {
# All Module::Install core packages now require synchronised versions.
# This will be used to ensure we don't accidentally load old or
# different versions of modules.
# This is not enforced yet, but will be some time in the next few
# releases once we can make sure it won't clash with custom
# Module::Install extensions.
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
use File::Find ();
use File::Path ();
use vars qw{$VERSION $MAIN};
BEGIN {
# All Module::Install core packages now require synchronised versions.
# This will be used to ensure we don't accidentally load old or
# different versions of modules.
# This is not enforced yet, but will be some time in the next few
# releases once we can make sure it won't clash with custom
# Module::Install extensions.
view all matches for this distribution