view release on metacpan or search on metacpan
lib/Bio/DB/Bam/Pileup.pm view on Meta::CPAN
Bio::DB::Bam::Pileup -- Object passed to pileup() callback
=head1 SYNOPSIS
See L<Bio::DB::Sam/The generic fetch() and pileup() methods> for how
this object is passed to pileup callbacks.
=head1 DESCRIPTION
A Bio::DB::Bam::Pileup object (or a Bio::DB::Bam::PileupWrapper
object) is passed to the callback passed to the Bio::DB::Sam->pileup()
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Bio/ToolBox/db_helper/alignment_callbacks.pm view on Meta::CPAN
package Bio::ToolBox::db_helper::alignment_callbacks;
use warnings;
use strict;
use Carp;
use Bio::ToolBox::db_helper::constants;
lib/Bio/ToolBox/db_helper/alignment_callbacks.pm view on Meta::CPAN
# passed parameters as array ref
# chromosome, start, stop, strand, strandedness, method, value, db, dataset
my $param = shift;
# check the current list of calculated callbacks
# cache the calculated callback method to speed up subsequent data
# collections it's likely only one method is ever employed in an
# execution, but just in case we will cache all that we calculate
my $string = sprintf "%s_%s_%s_%d", $param->[STND], $param->[STR],
$param->[METH], $param->[RETT];
lib/Bio/ToolBox/db_helper/alignment_callbacks.pm view on Meta::CPAN
__END__
=head1 NAME
Bio::ToolBox::db_helper::alignment_callbacks
=head1 DESCRIPTION
This module provides common callback subroutines for working with bam alignments.
It is generalized and may be used with either L<Bio::DB::Sam> or L<Bio::DB::HTS>
view all matches for this distribution
view release on metacpan or search on metacpan
scripts/biosql/load_ontology.pl view on Meta::CPAN
# don't forget to add namespace if the parser doesn't supply one
$ont->name($namespace) unless $ont->name();
print STDERR "Loading ontology ",$ont->name(),":\n\t... terms\n";
# in order to allow callbacks to the user and generally a
# better ability to interfere with and customize the upload
# process, we load all terms first here instead of simply
# going for the relationships
foreach my $term ($ont->get_all_terms()) {
view all matches for this distribution
view release on metacpan or search on metacpan
t/lib/Test/Harness/Straps.pm view on Meta::CPAN
$self->_reset_file_state;
$self->{file} = $name;
my $results = Test::Harness::Results->new;
# Set them up here so callbacks can have them.
$self->{totals}{$name} = $results;
while( defined(my $line = $it->next) ) {
$self->_analyze_line($line, $results);
last if $self->{saw_bailout};
}
view all matches for this distribution
view release on metacpan or search on metacpan
Bio/Event/EventHandlerI.pm view on Meta::CPAN
Title : start_document
Usage : $resultObj = $parser->start_document();
Function: Receive notification of the beginning of a document (the
input file of a parser). The parser will invoke this method
only once, before any other event callbacks.
Usually, a handler will reset any internal state structures
when this method is called.
Returns : none
view all matches for this distribution
view release on metacpan or search on metacpan
FlipFlop.pm view on Meta::CPAN
=head2 Overview
The initial state of a flip flop is false. It has an opportunity
to change state during each call to the C<test> method.
Two callbacks are provided at flip flop construction time, C<set> and
C<reset>. One or both of these callbacks may be evaluated when the
C<test> method is called. The callbacks are evaluated in scalar context,
and their return value is interpreted as a boolean.
While false, the flip flop evaluates the C<set> callback at each call to
the C<test> method. If the C<set> callback returns a true value, the
flip flop flips state to true. While true, the flip flop evaluates the
FlipFlop.pm view on Meta::CPAN
The C<new> method creates a new Bit::FlipFlop object. A newly created
flip flop's state is always false.
The C<set> and C<reset> arguments are required. They are sub refs that
are used for callbacks to test for setting or resetting the flip flop.
C<simultaneous_edges> is an optional argument that defaults to 1
(true) if unspecified. This argument governs whether the flip flop
may look for a leading edge and trailing edge within a single call to
the C<test> method.
view all matches for this distribution
view release on metacpan or search on metacpan
src/boost/mpi/config.hpp view on Meta::CPAN
#endif
#if defined(MPIAPI)
# define BOOST_MPI_CALLING_CONVENTION MPIAPI
#else
/** @brief Specifies the calling convention that will be used for callbacks
* from the underlying C MPI.
*
* This is a Windows-specific macro, which will be used internally to state
* the calling convention of any function that is to be used as a callback
* from MPI. For example, the internally-defined functions that are used in
* a call to @c MPI_Op_create. This macro is likely only to be useful to
* users that wish to bypass Boost.MPI, registering their own callbacks in
* certain cases, e.g., through @c MPI_Op_create.
*/
# define BOOST_MPI_CALLING_CONVENTION
#endif
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Bot/BasicBot.pm view on Meta::CPAN
}
sub run {
my $self = shift;
# create the callbacks to the object states
POE::Session->create(
object_states => [
$self => {
_start => "start_state",
die => "die_state",
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Bot/ChatBots/Telegram/Guide/Tutorial.pod view on Meta::CPAN
other again take advantage of L<Mojo::IOLoop> to do something (like the
new command C</remind>).
=item *
In both callbacks passed to L<Mojo::IOLoop> we use
a L<Bot::ChatBots::Telegram::Sender> object, relying upon the same object
that C<$bcb> uses to get new updates. As already anticipated, nothing
=item *
view all matches for this distribution
view release on metacpan or search on metacpan
v0.41
* Fixed bug that prevented bot from running.
v0.4
* Added support for MUC join parameters in config
* Added new module callbacks: muc_join, muc_part, muc_presence, muc_subject_change
* Added some hints and code snippets and example logger module
v0.3
* Added "presence" and "part" muc callbacks
* Added check for config and essential config settings presence
v0.2
* Added multilanguage support
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Bot/Pastebot/Server/Http.pm view on Meta::CPAN
(
(defined $conf{iface})
? ( Address => $conf{iface} )
: ()
),
# TODO - Can we use the discrete callbacks?
Acceptor => sub {
POE::Session->create(
inline_states => {
_start => \&httpd_session_started,
got_flush => \&httpd_session_flushed,
view all matches for this distribution
view release on metacpan or search on metacpan
examples/webhook.pl view on Meta::CPAN
}
$bot -> process_update($c -> req -> json);
};
$bot -> set_callbacks(message => sub {
my (undef, $update) = @_;
my $chat_id = $$update{message}{from}{id};
my $text = $$update{message}{text};
eval {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/pods/Box2D/b2Body.pod view on Meta::CPAN
=over 4
=item * C<Box2D::b2Shape> C<$shape> - the shape to be cloned.
=item * C<float32> C<$density> - the shape density (set to zero for static bodies). Warning:This function is locked during callbacks.
=back
Returns a C<Box2D::b2Fixture>
lib/pods/Box2D/b2Body.pod view on Meta::CPAN
Parameters:
=over 4
=item * C<Box2D::b2FixtureDef> C<$def> - the fixture definition. Warning:This function is locked during callbacks.
=back
Returns a C<Box2D::b2Fixture>
lib/pods/Box2D/b2Body.pod view on Meta::CPAN
Parameters:
=over 4
=item * C<Box2D::b2Fixture> C<$fixture> - the fixture to be removed. Warning:This function is locked during callbacks.
=back
=head2 GetAngle()
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Bread/Board/Manual/Concepts.pod view on Meta::CPAN
control of some part of your application over to some other part
of your application, be it your code or an outside framework.
IoC is a common paradigm in GUI frameworks, whereby you give up
control of your application flow to the framework and install your
code at callbacks hooks within the framework. For example, take a
very simple command line interface; the application asks a
question, the user responds, the application processes the answer
and asks another question, and so on until it is done. Now consider
the GUI approach for the same application; the application displays
a screen and goes into an event loop, users actions are processed
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
t/expected-sample-pbib.html view on Meta::CPAN
(Phillips, 1999)) systems create a shared-object space by
synchronizing the replicated objects [[Clock-Architecture],
[Dragonfly-Architecture], [COAST-ooSyncGroupware]]. In later versions
of GroupKit (Roseman and Greenberg, 1992; Roseman and Greenberg, 1996) shared
“environments” have been introduced as shared data
structures that can trigger callbacks upon changes.</P>
<P CLASS="western" STYLE="margin-bottom: 0.11cm">Application
designers thus have to decide to which degree or for which parts of
their application shared access to data is desirable or necessary.
For the Passage system, a shared data model enables a straightforward
access to data objects from different computers, which is necessary
view all matches for this distribution
view release on metacpan or search on metacpan
examples/params-validate.pl view on Meta::CPAN
}
sub check_cpr {
validate( @_,
{ cpr =>
{ callbacks =>
{ 'validate_cpr' => sub { validateCPR($_[0]); } } } } );
print $_[1]." is a valid CPR\n";
}
view all matches for this distribution
view release on metacpan or search on metacpan
examples/params-validate.pl view on Meta::CPAN
}
sub check_cvr {
validate( @_,
{ cvr =>
{ callbacks =>
{ 'validate_cvr' => sub { validateCVR($_[0]); } } } } );
print $_[1]." is a valid CVR\n";
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Business/DK/FI.pm view on Meta::CPAN
#number has to be a positive number between 1 and 99999999999999
validate_pos(
@ARG,
{ type => SCALAR,
regex => qr/^\d+$/,
callbacks => {
'higher than 0' => sub { shift() >= 1 },
'lower than 99999999999999' =>
sub { shift() <= 99999999999999 },
},
},
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Business/DK/PO.pm view on Meta::CPAN
use Business::DK::PO qw(validatePO);
sub check_cpr {
validate( @_,
{ po =>
{ callbacks =>
{ 'validate_po' => sub { validatePO($_[0]); } } } } );
print $_[1]." is a valid PO\n";
}
view all matches for this distribution
view release on metacpan or search on metacpan
t/004_end_to_end_pro.t view on Meta::CPAN
eval 'use Mojo::UserAgent';
$@ && plan skip_all => "Install Mojolicious to run this test";
# this is an "end to end" test - it will call the gocardless API
# using the details defined in the ENV variables below. you need
# to run t/gocardless_callback_reader.pl allowing the callbacks
# from gocardless to succeed, which feeds the details back into
# this script (hence "end to end") - note that the redirect URI
# and webhook URI in the sandbox/live developer settings will also
# need to match that of the address running the script
my ( $token,$url,$DEBUG ) = @ENV{qw/
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Business/Stripe/Webhook.pm view on Meta::CPAN
B<api_secret>: The Stripe secret API Key - see L<https://stripe.com/docs/keys>. Optional but will be required if the C<get_subscription> method is needed.
=item *
B<I<stripe-event>>: One or more callbacks to the subroutines to handle the webhooks events sent by Stripe. See L<https://stripe.com/docs/api/events/list>.
To listen for an event, change the fullstop in the Stripe event name to a minus sign and use that as the parameter. The events you define should match the events you ask Stripe to send. Any events Stripe sends that do not have a callback defined wi...
Stripe event C<invoice.paid> becomes C<invoice-paid>
Stripe event C<invoice.payment_failed> becomes C<invoice-payment_failed>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Business/TrueLayer/Request.pm view on Meta::CPAN
'Accept' => 'application/json; charset=UTF-8',
'Content-Type' => 'application/json; charset=UTF-8',
@{ $headers // [] },
},
# Mojo::UserAgent::Transactor::tx calls $self->generators and then the
# callbacks based on the count of @_, and does not expect undef here
(defined $body ? ($body) : ()),
))->result;
# Easiest to deal with this first, even though it should be very rare:
if ( $res->code == 301 ) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Business/US_Amort.pm view on Meta::CPAN
=item interest_rate
The annual rate, expressed like 8.3, not like .083.
Note that if you're defining callbacks, you can change this attribute
at any time in your callbacks, to change the rate of interest from
then on.
=item term
The term of the loan, in years, not months.
lib/Business/US_Amort.pm view on Meta::CPAN
=back
=head2 ITERATION ATTRIBUTES
These are attributes of little or no interest once C<run> is done, but
may be of interest to callbacks while C<run> is running, or may
be of interest in examining snapshots in C<table>.
=over
=item _month_count
This is how many months we are into the loan. The first month is 1.
=item _abort
If you want callbacks to be able to halt the iteration for some
reason, you can have them set C<_abort> to true. You may also choose
to set C<error> to something helpful.
=item _monthly_payment
The amount to be paid to toward the principal each month. At the start
of the loan, this is set to whatever C<initial_monthly_payment> is
figured to be, but you can manipulate C<_monthly_payment> with
callbacks to change how much actually gets paid when.
=item _remainder
The balance on the loan.
view all matches for this distribution
view release on metacpan or search on metacpan
Enhancement: built-in logging removes line-breaking whitespace from XML
v0.6.6 2018-02-15
New: debug and trace logging levels
New: POSR extrinsic "UserId"
Enhancement: trap fatal errors occuring during callbacks
Bugfix: transmissions lost input payloadID since v0.6.5
v0.6.5 2018-02-05
Bugfix: Transmission.pm: avoid possible conflicts between methods and keys
view all matches for this distribution
view release on metacpan or search on metacpan
t/samples/rtcpan.rdf view on Meta::CPAN
<item rdf:about="https://rt.cpan.org/Ticket/Display.html?id=84118">
<title>I really beg you to take back the exception catching feature in Future 0.11</title>
<link>https://rt.cpan.org/Ticket/Display.html?id=84118</link>
<description>I really beg you to take back the new feature in Future 0.11, in which
exceptions are caught by Future in followed_by(), and_then() and
or_else() callbacks.
This is because it can unintensionally hide critical errors and lead
to hard-to-solve bugs.
Suppose I use a function from someone's module.
t/samples/rtcpan.rdf view on Meta::CPAN
<item rdf:about="https://rt.cpan.org/Ticket/Display.html?id=84188">
<title>Error message is not user-friendly for followed_by(), and_then(), or_else() and repeat()</title>
<link>https://rt.cpan.org/Ticket/Display.html?id=84188</link>
<description>I often forget to return a Future in the callback for followed_by(),
and_then() or or_else() method, especially when I just mean to provide
other parts of my program with a way to chain further callbacks.
In this case, the error message should be more user-friendly.
Example:
view all matches for this distribution
view release on metacpan or search on metacpan
lib/BusyBird/Main/PSGI.pm view on Meta::CPAN
$assumed{$query_key} = $query_params->{$query_key};
}
my $ret_future = Future::Q->new;
$timeline->watch_unacked_counts(assumed => \%assumed, callback => sub {
my ($error, $w, $unacked_counts) = @_;
$w->cancel(); ## immediately cancel the watcher to prevent multiple callbacks
if($error) {
$ret_future->reject($error, 1);
}else {
$ret_future->fulfill($unacked_counts);
}
lib/BusyBird/Main/PSGI.pm view on Meta::CPAN
}
my $ret_future = Future::Q->new;
$self->{main_obj}->watch_unacked_counts(
level => $level, assumed => \%assumed, callback => sub {
my ($error, $w, $tl_unacked_counts) = @_;
$w->cancel(); ## immediately cancel the watcher to prevent multiple callbacks
if($error) {
$ret_future->reject($error, 1);
}else {
$ret_future->fulfill($tl_unacked_counts);
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/C/Blocks.xs view on Meta::CPAN
SV * msg_SV = get_sv("C::Blocks::_msg", 0);
sv_setpvn(msg_SV, msg, bytes);
}
/*****************************************/
/**** Extended symbol table callbacks ****/
/*****************************************/
TokenSym_p my_symtab_lookup_by_name(char * name, int len, void * data, extended_symtab_p* containing_symtab) {
/* Unpack the callback data */
extended_symtab_callback_data * callback_data = (extended_symtab_callback_data*)data;
lib/C/Blocks.xs view on Meta::CPAN
/* Set the extended symbol table lists if they exist */
if (SvPOK(data->exsymtabs) && SvCUR(data->exsymtabs)) {
callback_data.N_tables = SvCUR(data->exsymtabs) / sizeof(available_extended_symtab);
callback_data.available_extended_symtabs = (available_extended_symtab*) SvPV_nolen(data->exsymtabs);
}
tcc_set_extended_symtab_callbacks(state, &my_symtab_lookup_by_name,
&my_symtab_sym_used, &my_prep_table, &callback_data);
/* set the block function's argument, if any */
if (keyword_type == IS_CBLOCK) {
/* If this is a block, we need to define C_BLOCKS_THX_DECL.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/C/DynaLib.pm view on Meta::CPAN
($codeptr, $ret_type, $arg_type, $func)
= unpack(CONFIG_TEMPLATE, $Config->[$index]);
last unless $codeptr;
}
if ($index > $#{$Config}) {
carp "Limit of ", scalar(@$Config), " callbacks exceeded";
return undef;
}
($coderef, $ret_type, @arg_type) = @_;
$ret_type =~ /^$GoodRet$/o
lib/C/DynaLib.pm view on Meta::CPAN
Using callback routines
Some C functions expect a pointer to another C function as an
argument. The library code that receives the pointer may use it to
call an application function at a later time. Such functions are
called I<callbacks>.
This module allows you to use a Perl sub as a C callback, subject to
certain restrictions. There is a hard-coded maximum number of
callbacks that can be active at any given time. The default (4) may
be changed by specifying C<CALLBACKS=number> on the F<Makefile.PL>
command line.
A callback's argument and return types are specified using C<pack>
codes, as described above for library functions. Currently, the
lib/C/DynaLib.pm view on Meta::CPAN
$string2 = "foolish";
$result = &{$strncmp}($string1, $string2, 3); # $result is 0
$result = &{$strncmp}($string1, $string2, 4); # $result is -1
The files F<test.pl> and F<README.win32> contain examples using
callbacks.
=head1 CALLING CONVENTIONS
This section is intended for anyone who is interested in debugging or
extending this module. You probably don't need to read it just to
lib/C/DynaLib.pm view on Meta::CPAN
&$strncmp($dummy1 = "foo", $dummy2 = "bar", 3);
=head2 Callbacks
Only a certain number of callbacks can exist at a time. Callbacks can
mess up the message produced by C<die> in the presence of nested
C<eval>s. The Callback code uses global data, and is consequently not
thread-safe.
=head2 Miscellaneous Bugs
view all matches for this distribution
view release on metacpan or search on metacpan
src/sparse-0.4.4/LICENSE view on Meta::CPAN
and annotate the resulting parse tree with the semantic meaning (aka
"types") of the sources. Thus just the act of linking this library into
another program (aka "back-end") does NOT in itself make that back-end
be considered a derivative work of this Original Work.
However, any modifications, callbacks or other functionality that is
added and run either directly or indirectly by the front-end are to be
considered derived works of this library, and as such fall under the
requirements of this license.
Linus Torvalds
view all matches for this distribution