view release on metacpan or search on metacpan
lib/Config/Eggdrop/Userfile.pm view on Meta::CPAN
# - implement at least the lines that could be written by eggdrop 1.6. Older
# userfiles shouldn't be very relevant anymore
# - This means fix all FIXMEs below
# - add a limited mode that only searches for a certain user/password you're
# looking for rather than taking apart the whole userfile as they can become
# relatively big. => OO module with callbacks?
# - write documentation
# - put on CPAN
=head2 Functions
view all matches for this distribution
view release on metacpan or search on metacpan
Debian_CPANTS.txt view on Meta::CPAN
"libmarc-crosswalk-dublincore-perl", "MARC-Crosswalk-DublinCore", "0.02", "0", "0"
"libmarc-lint-perl", "MARC-Lint", "1.43", "0", "1"
"libmarc-perl", "MARC", "1.07", "0", "1"
"libmarc-record-perl", "MARC-Record", "2.0.0", "0", "0"
"libmarc-xml-perl", "MARC-XML", "0.88", "0", "0"
"libmasonx-interp-withcallbacks-perl", "MasonX-Interp-WithCallbacks", "1.18", "0", "0"
"libmath-algebra-symbols-perl", "Math-Algebra-Symbols", "1.21", "0", "1"
"libmath-bigint-gmp-perl", "Math-BigInt-GMP", "1.24", "1", "0"
"libmath-calculus-differentiate-perl", "Math-Calculus-Differentiate", "0.3", "0", "0"
"libmath-calculus-expression-perl", "Math-Calculus-Expression", "0.2.2.ds", "0", "0"
"libmath-calculus-newtonraphson-perl", "Math-Calculus-NewtonRaphson", "0.1", "0", "0"
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Config/GitLike.pm view on Meta::CPAN
content => 'str'
callback => sub {}
error => sub {}
Parses the given content and runs callbacks as it finds valid information.
Returns undef on success and C<error($content)> (the original content) on
failure.
C<callback> is called like:
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Config/Merge.pm view on Meta::CPAN
$self->{debug} = $params->{debug} ? 1 : 0;
die "Parameter 'sort' must be a coderef"
if exists $params->{sort} && ref $params->{sort} ne 'CODE';
# Setup callbacks
$self->_init_callback( $_, $params->{$_} )
foreach qw(skip is_local load_as sort);
my $path = $params->{path}
or die( "Configuration directory not specified when creating a new "
lib/Config/Merge.pm view on Meta::CPAN
#===================================
my ( $self, $filename, $local ) = @_;
return $local ? '' : $filename;
}
my %callbacks = (
CODE => \&_init_code_callback,
HASH => \&_init_hash_callback,
ARRAY => \&_init_array_callback,
);
lib/Config/Merge.pm view on Meta::CPAN
$self->debug("Using default or subclassed $callback()");
return;
}
$check = [$check]
unless exists $callbacks{ ref $check };
$self->debug( 'Using ' . ( ref $check ) . " handler for $callback()" );
$self->{$callback} = $callbacks{ ref $check }->( $check, $callback );
return;
}
#===================================
sub _init_code_callback {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Cme/Command/meta.pm view on Meta::CPAN
{default => 'lib/Config/Model'}
],
[
"dumptype=s" => "dump every values (full), only preset values "
. "or only customized values (default)",
{callbacks => { 'expected values' => sub { $_[0] =~ m/^full|preset|custom$/ ; }}}
],
[ "dev!" => 'use model in ./lib to create a plugin'],
[ "open-item=s" => "force the UI to open the specified node"],
[ "plugin-file=s" => "create a model plugin in this file" ],
[ "load-yaml=s" => "load model from YAML file" ],
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Config/Model/Iterator.pm view on Meta::CPAN
Subroutine called backed for hash elements. See
L<Config::Model::ObjTreeScanner/"Callback prototypes"> for signature
and details. (mandatory)
=head1 Custom callbacks
By default, C<leaf_cb> is called for all types of leaf elements
(i.e enum. integer, strings, ...). But you can provide dedicated
call-back for each type of leaf:
view all matches for this distribution
view release on metacpan or search on metacpan
libucl-0.8.1/doc/api.md view on Meta::CPAN
/** Opaque userdata pointer */
void *ud;
};
~~~
This structure defines the following callbacks:
- `ucl_emitter_append_character` - a function that is called to append `nchars` characters equal to `c`
- `ucl_emitter_append_len` - used to append a string of length `len` starting from pointer `str`
- `ucl_emitter_append_int` - this function applies to integer numbers
- `ucl_emitter_append_double` - this function is intended to output floating point variable
view all matches for this distribution
view release on metacpan or search on metacpan
- Add missing example from doc.
- Rename CHANGES to Changes.
- Rewrite Changes file to CPAN::Changes::SPEC format.
0.03 2012-08-03
- Fix bug in hash_array and callbacks.
- Improve doc.
- Rename variables in code to better names.
0.02 2012-08-03
- Add hash_array() subroutine.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Config/Validate.pm view on Meta::CPAN
}
my $type = clone(\%p);
delete $type->{name};
if (keys %$type == 0) {
_throw "No callbacks defined for type '$p{name}'";
}
$types{$p{name}} = $type;
return;
lib/Config/Validate.pm view on Meta::CPAN
}
my $type = clone(\%p);
delete $type->{name};
if (keys %$type == 0) {
_throw "No callbacks defined for type '$p{name}'";
}
$types[$$self]{$p{name}} = $type;
return;
}
lib/Config/Validate.pm view on Meta::CPAN
the base class. Any instances that are alread created will retain
their existing type configuration.
=head2 mkpath
This is a convenience function for people writing callbacks and user
defined type validation. It takes either an array or array reference
and returns a string that represents the path to a specific item in
the configuration. This might be useful if you're interested in
having your error messages be consistent with the rest of
C<Config::Validate>. This is available for export, but not exported
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Config/XPath/Reloadable.pm view on Meta::CPAN
Where a simple C<name=value> config file could be reloaded just by reapplying
string values, a whole range of new problems occur with the richer layout
afforded to XML-based files. New nodes can appear, old nodes can move, change
their data, or disappear. All these changes may involve data structure changes
within the containing program. To cope with these types of events, callbacks
in the form of closures can be registered that are called when various changes
happen to the underlying XML data.
As with the non-reloadable parent class, configuration is generally processed
by forming a tree of objects which somehow maps onto the XML data tree. The
way this is done in this class, is to use the $node parameter passed in to the
C<add> and C<keep> event callbacks. This parameter will hold a child
C<Config::XPath::Reloadable> object with its XPath context pointing at the
corresponding node in the XML data, much like the C<get_sub()> method does.
=cut
lib/Config/XPath/Reloadable.pm view on Meta::CPAN
$map = $config->get_map( $listpath, $keypath, $valuepath )
Because of the dynamically-reloadable nature of objects in this class, the
C<get_sub()> and C<get_sub_list()> methods are no longer allowed. They will
instead throw exceptions. The event callbacks in nodelists and nodesets
should be used instead, to obtain subconfigurations.
=cut
=head2 $conf->reload()
lib/Config/XPath/Reloadable.pm view on Meta::CPAN
called on a child object, the stored XPath data tree is updated from the
parent.
In either case, after the data is reloaded, each nodelist stored by the object
is reevlauated, by requerying the XML nodeset using the stored XPaths, and the
event callbacks being invoked as appropriate.
=cut
sub reload
{
lib/Config/XPath/Reloadable.pm view on Meta::CPAN
Finally, the list of nodes that were present last time which no longer exist
is determined, and the C<remove> callback called for those, in no particular
order.
When this method is called, the C<add> callbacks will be invoked before the
method returns, for any matching items found in the data.
The C<%events> hash should be passed keys for the following events:
=over 8
lib/Config/XPath/Reloadable.pm view on Meta::CPAN
nodewithin the nodelist given by the $listpath, and the $node parameter will
contain a C<Config::XPath::Reloadable> object reference, with the XPath
context at the respective XML data node.
If further recursive nodesets are associated on the inner config node given
to the C<add> or C<keep> callbacks, then the C<keep> callback should invoke
the C<reload> method on the node, to ensure full recursive reloading of the
content.
=cut
view all matches for this distribution
view release on metacpan or search on metacpan
xt/author/pod_spelling_system.t view on Meta::CPAN
TODO
filename
filenames
login
callback
callbacks
standalone
VMS
hostname
hostnames
TCP
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Constant/Export/Lazy.pm view on Meta::CPAN
There's dozens of modules on the CPAN that define constants in one way
or another, why did I need to write this one?
=head2 It's lazy
Our constants are fleshened via callbacks that are guaranteed to be
called only once for the lifetime of the process (not once per
importer or whatever), and we only call the callbacks lazily if
someone actually requests that a constant of ours be defined.
This makes it easy to have one constant exporting module that runs in
different environments, and generates some subset of its constants
depending on what the program that's using it actually needs.
lib/Constant/Export/Lazy.pm view on Meta::CPAN
that aren't available everywhere, queries to databases that aren't
available everywhere, or make certain assumptions about the
environment they're running under that may not be true across all your
environments.
By only defining those constants you actually need via callbacks
managing all these special-cases becomes a lot easier.
=head2 It makes it easier to manage creating constants that require other constants
Maybe you have one constant indicating whether you're running in a dev
lib/Constant/Export/Lazy.pm view on Meta::CPAN
munged name to be used in the private symbol table.
We consider this a purely functional subroutine and you B<MUST> return
the same munged name for the same C<$gimme> because we might resolve
that C<$gimme> multiple times. Failure to do so will result your
callbacks being redundantly re-defined.
=head1 CONTEXT OBJECT
As discussed above we pass around a context object to all callbacks
that you can define. See C<$ctx> in the L</SYNOPSIS> for examples.
This objects has only two methods:
=over
view all matches for this distribution
view release on metacpan or search on metacpan
t/013_cmd.t view on Meta::CPAN
# check return code
if (exists $test->{retcode}) {
is($retcode, $test->{retcode}, "$test_set: return code");
}
# return-code callback tests: test callbacks for zero flag, nonzero flag & nonzero value
if ($test->{nonzero_set} // 0) {
is($nonzero_flag, 1, "$test_set: nonzero flag set");
}
if ($test->{nonzero_unset} // 0) {
is($nonzero_flag, 0, "$test_set: nonzero flag unset");
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Continuity/Widget.pm view on Meta::CPAN
use Data::UUID;
use Moose;
with 'Continuity::Coro::Moose';
# List of callbacks, buttons for now
has callback => ( is => 'rw', default => sub {{}} );
has renderer => ( is => 'rw', isa => 'HashRef', default => sub {{}});
has 'uuid' => (
view all matches for this distribution
view release on metacpan or search on metacpan
eg/callback_counter.pl view on Meta::CPAN
);
my $decrement_link = $request->callback_link(
'--' => sub { $counter-- }
);
$request->print("Count: $counter<br>$increment_link $decrement_link");
$request->next->execute_callbacks;
if($counter == 42) {
$request->print(q{
<h1>The Answer to Life, The Universe, and Everything</h1>
});
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Control/CLI.pm view on Meta::CPAN
if ($connectionType =~ /^TELNET$/i) {
croak "$pkgsub: Module 'Net::Telnet' required for telnet access" unless $UseTelnet;
@CLI::ISA = qw(Net::Telnet);
$parent = Net::Telnet->new(Binmode => 1);
# Set up callbacks for telnet options
$parent->option_callback(\&_telnet_opt_callback);
$parent->suboption_callback(\&_telnet_subopt_callback);
$connectionType = 'TELNET';
}
elsif ($connectionType =~ /^SSH$/i) {
lib/Control/CLI.pm view on Meta::CPAN
$self->{read_block_size} = ($^O eq 'MSWin32') ? $Default{read_block_size}{SERIAL_WIN32}
: $Default{read_block_size}{SERIAL_DEVICE};
}
bless $self, $class;
if ($connectionType eq 'TELNET') {
# We are going to setup option callbacks to handle telnet options terminal type and window size
# However the callbacks only provide the telnet object and there is no option to feed additional arguments
# So need to link our object into the telnet one; here we create a key to contain our object
*$parent->{net_telnet}->{$Package} = $self;
}
foreach my $arg (keys %args) { # Accepted arguments on constructor
if ($arg eq 'errmode') { $self->errmode($args{$arg}) }
lib/Control/CLI.pm view on Meta::CPAN
if ($connect->{stage} < 1) { # Initial setup - do only once
$self->{BUFFER} = '';
$self->{LOGINSTAGE} = '';
# For these arguments, go change the object setting, as it will need accessing via Net:Telnet callbacks
$self->terminal_type($connect->{terminal_type}) if defined $connect->{terminal_type};
$self->window_size(@{$connect->{window_size}}) if defined $connect->{window_size};
}
if ($self->{TYPE} eq 'TELNET') {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/ControlFreak/Proxy/Process.pm view on Meta::CPAN
## where we buffer the writes until our wout fh are ready
$proxy->{log_buffer} = [];
$proxy->{status_buffer} = [];
## callbacks
$proxy->{readers}{ $proxy->{command_fh} } = sub { $proxy->command_cb(@_) };
$proxy->{writers}{ $proxy->{log_fh} } = $proxy->{log_buffer}
if $proxy->{log_fh};
$proxy->{writers}{ $proxy->{status_fh} } = $proxy->{status_buffer};
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Convert/TAP/Archive.pm view on Meta::CPAN
$formatter->prepare;
my $session;
my $aggregator = TAP::Harness::Archive->aggregator_from_archive({
archive => $args{archive},
parser_callbacks => {
ALL => sub {
$session->result( $_[0] );
},
},
made_parser_callback => sub {
view all matches for this distribution
view release on metacpan or search on metacpan
=back
See the C<OPT_xxx> constants above to see which options exist.
=head2 Setting various callbacks
=over
=item SetMsgCallback [callback-function]
$item->decode_temp
$item->remove_temp
$item->info
The perl interpreter will be reacquired/released on every callback
invocation, so for performance reasons, callbacks should be avoided if
that is costly.
Future versions might enable multicore support for more functions.
=head1 BUGS AND LIMITATIONS
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Convos/public/js/jquery.js view on Meta::CPAN
firingStart,
// Actual callback list
list = [],
// Stack of fire calls for repeatable lists
stack = !options.once && [],
// Fire callbacks
fire = function( data ) {
memory = options.memory && data;
fired = true;
firingIndex = firingStart || 0;
firingStart = 0;
lib/Convos/public/js/jquery.js view on Meta::CPAN
}
}
},
// Actual Callbacks object
self = {
// Add a callback or a collection of callbacks to the list
add: function() {
if ( list ) {
// First, we save the current length
var start = list.length;
(function add( args ) {
lib/Convos/public/js/jquery.js view on Meta::CPAN
// Inspect recursively
add( arg );
}
});
})( arguments );
// Do we need to add the callbacks to the
// current firing batch?
if ( firing ) {
firingLength = list.length;
// With memory, if we're not firing then
// we should call right away
lib/Convos/public/js/jquery.js view on Meta::CPAN
});
}
return this;
},
// Check if a given callback is in the list.
// If no argument is given, return whether or not list has callbacks attached.
has: function( fn ) {
return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length );
},
// Remove all callbacks from the list
empty: function() {
list = [];
firingLength = 0;
return this;
},
lib/Convos/public/js/jquery.js view on Meta::CPAN
},
// Is it locked?
locked: function() {
return !stack;
},
// Call all callbacks with the given context and arguments
fireWith: function( context, args ) {
if ( list && ( !fired || stack ) ) {
args = args || [];
args = [ context, args.slice ? args.slice() : args ];
if ( firing ) {
lib/Convos/public/js/jquery.js view on Meta::CPAN
fire( args );
}
}
return this;
},
// Call all the callbacks with the given arguments
fire: function() {
self.fireWith( this, arguments );
return this;
},
// To know if the callbacks have already been called at least once
fired: function() {
return !!fired;
}
};
lib/Convos/public/js/jquery.js view on Meta::CPAN
anim: animation,
queue: animation.opts.queue
})
);
// attach callbacks from options
return animation.progress( animation.opts.progress )
.done( animation.opts.done, animation.opts.complete )
.fail( animation.opts.fail )
.always( animation.opts.always );
}
lib/Convos/public/js/jquery.js view on Meta::CPAN
timers.splice( index, 1 );
}
}
// start the next in the queue if the last step wasn't forced
// timers currently will call their complete callbacks, which will dequeue
// but only if they were gotoEnd
if ( dequeue || !gotoEnd ) {
jQuery.dequeue( this, type );
}
});
lib/Convos/public/js/jquery.js view on Meta::CPAN
jQuery( callbackContext ) :
jQuery.event,
// Deferreds
deferred = jQuery.Deferred(),
completeDeferred = jQuery.Callbacks("once memory"),
// Status-dependent callbacks
statusCode = s.statusCode || {},
// Headers (they are sent all at once)
requestHeaders = {},
requestHeadersNames = {},
// The jqXHR state
lib/Convos/public/js/jquery.js view on Meta::CPAN
s.mimeType = type;
}
return this;
},
// Status-dependent callbacks
statusCode: function( map ) {
var code;
if ( map ) {
if ( state < 2 ) {
for ( code in map ) {
// Lazy-add the new callback in a way that preserves old ones
statusCode[ code ] = [ statusCode[ code ], map[ code ] ];
}
} else {
// Execute the appropriate callbacks
jqXHR.always( map[ jqXHR.status ] );
}
}
return this;
},
lib/Convos/public/js/jquery.js view on Meta::CPAN
}
// aborting is no longer a cancellation
strAbort = "abort";
// Install callbacks on deferreds
for ( i in { success: 1, error: 1, complete: 1 } ) {
jqXHR[ i ]( s[ i ] );
}
// Get transport
lib/Convos/public/js/jquery.js view on Meta::CPAN
deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
} else {
deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
}
// Status-dependent callbacks
jqXHR.statusCode( statusCode );
statusCode = undefined;
if ( fireGlobals ) {
globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError",
lib/Convos/public/js/jquery.js view on Meta::CPAN
} else if ( xhr.readyState === 4 ) {
// (IE6 & IE7) if it's in cache and has been
// retrieved directly we need to fire the callback
setTimeout( callback );
} else {
// Add to the list of active xhr callbacks
xhr.onreadystatechange = xhrCallbacks[ id ] = callback;
}
},
abort: function() {
lib/Convos/public/js/jquery.js view on Meta::CPAN
this[ callback ] = true;
return callback;
}
});
// Detect, normalize options and install callbacks for jsonp requests
jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
var callbackName, overwritten, responseContainer,
jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?
"url" :
view all matches for this distribution
view release on metacpan or search on metacpan
/* With typemap, maps AvObject to a blessed AV */
typedef AV AvObject;
/* NOTE: Some would argue that there's nothing simple or easy about
* doing callbacks from C to Perl. Consult the perlcall manpage for
* descriptions of the macros and concepts used here. These examples
* cover an end-case which is not covered in the manpage (that the
* blessed object has already been dereferenced).
*/
view all matches for this distribution
view release on metacpan or search on metacpan
do a create and attach in one operation using C<port_async>.
=item peval
This function works exactly as C<AnyEvent::MP::psub> - you could use it to
run callbacks within a port context (good for monitoring), but you cannot
C<get> messages unless the callback executes within the thread attached to
the port.
Since creating a thread with port context requires somewhta annoying
syntax, there is a C<peval_async> function that handles that for you - note
=item rcv_async $port, $threadcb
This function creates and attaches a thread on a port. The thread is set
to execute C<$threadcb> and is put into the ready queue. The thread will
receive all messages not filtered away by tagged receive callbacks (as set
by C<AnyEvent::MP::rcv>) - it simply replaces the default callback of an
AnyEvent::MP port.
The special variable C<$SELF> will be set to C<$port> during thread
execution.
view all matches for this distribution
view release on metacpan or search on metacpan
Multicore.pm view on Meta::CPAN
supported operations run asynchronously either by default, or only when
requested. The reason you might not want to enable this module for all
operations by default is compatibility with existing code:
Since this module integrates into an event loop and you must not normally
block and wait for something in an event loop callbacks. Now imagine
somebody patches your favourite module (e.g. Digest::MD5) to take
advantage of of the Perl Multicore API.
Then code that runs in an event loop callback and executes
Digest::MD5::md5 would work fine without C<Coro::Multicore> - it would
Multicore.pm view on Meta::CPAN
deadlock.
=head2 USE IT IN THE MAIN PROGRAM
One way to avoid this is to not run perlmulticore enabled functions
in any callbacks. A simpler way to ensure it works is to disable
C<Coro::Multicore> thread switching in event loop callbacks, and enable it
everywhere else.
Therefore, if you control the event loop, as is usually the case when
you write I<program> and not a I<module>, then you can enable C<Coro::Multicore>
by default, and disable it in your event loop thread:
view all matches for this distribution
view release on metacpan or search on metacpan
>> on that once some event happens, and last you call C<schedule> to put
yourself to sleep. Note that a lot of things can wake your coro up,
so you need to check whether the event indeed happened, e.g. by storing the
status in a variable.
See B<HOW TO WAIT FOR A CALLBACK>, below, for some ways to wait for callbacks.
=item cede
"Cede" to other coros. This function puts the current coro into
the ready queue and calls C<schedule>, which has the effect of giving
Registers a callback that is called when this coro thread gets destroyed,
that is, after it's resources have been freed but before it is joined. The
callback gets passed the terminate/cancel arguments, if any, and I<must
not> die, under any circumstances.
There can be any number of C<on_destroy> callbacks per coro, and there is
currently no way to remove a callback once added.
=item $oldprio = $coro->prio ($newprio)
Sets (or gets, if the argument is missing) the priority of the
original code ref will be called (with parameters) from within another
coro.
The reason this function exists is that many event libraries (such as
the venerable L<Event|Event> module) are not thread-safe (a weaker form
of reentrancy). This means you must not block within event callbacks,
otherwise you might suffer from crashes or worse. The only event library
currently known that is safe to use without C<unblock_sub> is L<EV> (but
you might still run into deadlocks if all event loops are blocked).
Coro will try to catch you when you block in the event loop
("FATAL: $Coro::idle blocked itself"), but this is just best effort and
only works when you do not run your own event loop.
This function allows your callbacks to block by executing them in another
coro where it is safe to block. One example where blocking is handy
is when you use the L<Coro::AIO|Coro::AIO> functions to save results to
disk, for example.
In short: simply use C<unblock_sub { ... }> instead of C<sub { ... }> when
creating event callbacks that want to block.
If your handler does not plan to block (e.g. simply sends a message to
another coro, or puts some other coro into the ready queue), there is
no reason to use C<unblock_sub>.
Note that you also need to use C<unblock_sub> for any other callbacks that
are indirectly executed by any C-based event loop. For example, when you
use a module that uses L<AnyEvent> (and you use L<Coro::AnyEvent>) and it
provides callbacks that are the result of some event callback, then you
must not block either, or use C<unblock_sub>.
=cut
our @unblock_queue;
# we create a special coro because we want to cede,
# to reduce pressure on the coro pool (because most callbacks
# return immediately and can be reused) and because we cannot cede
# inside an event callback.
our $unblock_scheduler = new Coro sub {
while () {
while (my $cb = pop @unblock_queue) {
&async_pool (@$cb);
# for short-lived callbacks, this reduces pressure on the coro pool
# as the chance is very high that the async_poll coro will be back
# in the idle state when cede returns
cede;
}
schedule; # sleep well
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Couchbase/Client/Async.pm view on Meta::CPAN
and
$arglist->[CTORIDX_CBWAITDONE] = delete $async_opts{cb_waitdone}
and
$arglist->[CTORIDX_CBTIMERMOD] = delete $async_opts{cb_update_timer}
or die "We require update_event, error, and wait_done callbacks";
if($async_opts{bless_events}) {
$arglist->[CTORIDX_BLESS_EVENT] = 1;
}
lib/Couchbase/Client/Async.pm view on Meta::CPAN
=head1 EVENT MANAGEMENT
Event, Timer, and I/O management is the lower level of this module, and constitutes
the interface which event loop integrators would need to be most attune to.
At the most basic level, you are required to implement four callbacks. These
callbacks are indicated by values passed to their given hash keys in the object's
constructor.
=head3 C<cb_update_event>
cb_update_event => sub {
view all matches for this distribution
view release on metacpan or search on metacpan
xs/plcb-util.h
xs/plcb-return.h
xs/ppport.h
xs/typemap
xs/callbacks.c
xs/convert.c
xs/constants.c
xs/opcontext.c
################################################################################
view all matches for this distribution
view release on metacpan or search on metacpan
The C<TO_JSON> method may safely call die if it wants. If C<TO_JSON>
returns other blessed objects, those will be handled in the same
way. C<TO_JSON> must take care of not causing an endless recursion
cycle (== crash) in this case. The same care must be taken with
calling encode in stringify overloads (even if this works by luck in
older perls) or other callbacks. The name of C<TO_JSON> was chosen
because other methods called by the Perl core (== not by the user of
the object) are usually in upper case letters and to avoid collisions
with any C<to_json> function or method.
If C<$enable> is false (the default), then C<encode> will not consider
For deserialization there are only two cases to consider: either
nonstandard tagging was used, in which case C<allow_tags> decides,
or objects cannot be automatically be deserialized, in which
case you can use postprocessing or the C<filter_json_object> or
C<filter_json_single_key_object> callbacks to get some real objects our of
your JSON.
This section only considers the tagged value case: I a tagged JSON object
is encountered during decoding and C<allow_tags> is disabled, a parse
error will result (as if tagged values were not part of the grammar).
view all matches for this distribution
view release on metacpan or search on metacpan
include/bearssl_ssl.h view on Meta::CPAN
* error. The 'len' parameter is guaranteed never to exceed
* 20000, so the length always fits in an 'int' on all
* parameters.
*
* A socket closure (if the transport medium is a socket) should be reported
* as an error (-1). The callbacks shall endeavour to block until at least
* one byte can be read or written; a callback returning 0 at times is
* acceptable, but this normally leads to the callback being immediately
* called again, so the callback should at least always try to block for
* some time if no I/O can take place.
*
* The SSL engine naturally applies some buffering, so the callbacks need
* not apply buffers of their own.
*/
/**
* \brief Context structure for the simplified SSL I/O wrapper.
*
include/bearssl_ssl.h view on Meta::CPAN
* - The `len` parameter is never zero, and is always lower than 20000.
*
* - The number of processed bytes (read or written) is returned. Since
* that number is less than 20000, it always fits on an `int`.
*
* - On error, the callbacks return -1. Reaching end-of-stream is an
* error. Errors are permanent: the SSL connection is terminated.
*
* - Callbacks SHOULD NOT return 0. This is tolerated, as long as
* callbacks endeavour to block for some non-negligible amount of
* time until at least one byte can be sent or received (if a
* callback returns 0, then the wrapper invokes it again
* immediately).
*
* - Callbacks MAY return as soon as at least one byte is processed;
view all matches for this distribution
view release on metacpan or search on metacpan
bin/SplitCombine.pl view on Meta::CPAN
$dir=~s|(.*)/.*|$1|;
my $app="$dir/SplitCombine.xml";
#$gladexml = Gtk2::GladeXML->new($app);
#ui_callbacks::init($gladexml);
#$gladexml->signal_autoconnect_from_package("ui_callbacks" );
my $builder=Gtk2::Builder->new;
$builder->add_from_file($app);
ui_callbacks::init($builder);
$builder->connect_signals(undef, ui_callbacks);
warn "builder is $builder\n";
Gtk2->main;
1;
package ui_callbacks;
# The Gtk2::GladeXML module doesn't pass the user_data information
# from the glade file, so we have to have a separate callback for each
# widget. Which is a pity, because if it did, we could just implement
# one callback for each type of widget and use the user_data field to
view all matches for this distribution
view release on metacpan or search on metacpan
to your liking (example of a configuration file is given in help).
- Client WILL NOT ask for domain verification now if previous verification results are still valid - that should
allow renewals to be done without re-verification for about a year. Note: that makes --verified parameter obsolete.
- Client now allows email to be used for registration.
- Client is largely rewritten and the new home for the project is referenced (https://ZeroSSL.com)
- On domain verification failure the error message is available now to callbacks under the 'error' key of results.
- Crypt::LE::Complete::Simple can now use the logger passed to it by the client.
- Crypt::LE::Complete::Simple is now also given a list of domains the certificate is issued for.
- Crypt::LE::Challenge::Simple can now use the logger passed to it by the client (or other application).
- Crypt::LE::Challenge::Simple now has DNS verification example added.
- Client now supports basic DNS verification by using the following parameters in a command line:
view all matches for this distribution