Result:
found more than 832 distributions - search limited to the first 2001 files matching your query ( run in 0.775 )


Async-Queue

 view release on metacpan or  search on metacpan

t/10-sync.t  view on Meta::CPAN

    is($q->$_(), $handlers{$_}, "get $_ handler") foreach keys %handlers;
    ok(!defined($q->$_(undef)), "set $_ handler to undef") foreach keys %handlers;
}

{
    note('--- event callbacks receive the object as the first argument');
    my @results = ();
    my $q; $q = new_ok('Async::Queue', [
        concurrency => 1, worker => sub {
            my ($task, $cb) = @_;
            push(@results, $task);

 view all matches for this distribution


Async-Redis

 view release on metacpan or  search on metacpan

examples/pagi-chat/lib/ChatApp/State.pm  view on Meta::CPAN

my $pubsub_subscription;

# Background task selector (per-worker)
my $background_selector;

# Local session callbacks (for this worker only)
# Redis PubSub delivers to all workers, but we only call callbacks for OUR clients
my %local_sessions;

use constant {
    MAX_MESSAGES_PER_ROOM => 100,
    SESSION_TTL           => 86400,    # 24 hours

 view all matches for this distribution


Async-Selector

 view release on metacpan or  search on metacpan

eg/examples.pl  view on Meta::CPAN

        print "B: $res{B}\n";
        ## persistent callback
    });

    ## Trigger the resources.
    ## Execution order of watcher callbacks is not guaranteed.
    ($A, $B) = ('aaaaa', 'bbbbb');
    $selector->trigger('A', 'B');   ## -> A: aaaaa
                                    ## -> B: bbbbb
    print "--------\n";
    ## $watcher_a is already canceled.

 view all matches for this distribution


Async-Trampoline

 view release on metacpan or  search on metacpan

lib/Async/Trampoline.pm  view on Meta::CPAN

Importantly, such trampolines eliminate tail calls.

This programming style is powerful but inconvenient
because you tend to get callback hell.
This module implements simple Futures with an async/await syntax.
Instead of nesting the callbacks, we can now chain callbacks more easily.

This module was initially created
in order to write recursive algorithms around compiler construction:
recursive-descent parsers and recursive tree traversal.
However, it is certainly applicable to other problems as well.

lib/Async/Trampoline.pm  view on Meta::CPAN

=for test

In B<Incomplete> states, the Async will be processed in the future.
At some point, the Async will transition to a completed state.

In C<async> and C<await> callbacks,
the Async will be updated to the state of the return value of that callback.

B<Completed> states are terminal.
The Asyncs are not subject to further processing.

 view all matches for this distribution


Async-Util

 view release on metacpan or  search on metacpan

lib/Async/Util.pm  view on Meta::CPAN

action ever passes an error to its callback then the cb coderef is immediately
invoked and passed the error. No more inputs are processed.

=head2 azipmap

C<azipmap> executes a list of callbacks on a list of corresponding inputs.
Every provided action is executed and passed the input found in the same
position in the list of provided inputs. In other words, the list of actions
and the list of inputs are zipped in to action/input pairs, then each action
is executed on its input.

 view all matches for this distribution


AtExit

 view release on metacpan or  search on metacpan

lib/AtExit.pm  view on Meta::CPAN

I<reverse> order of registration (last one registered is invoked first).
Registering the same subroutine more than once will cause that subroutine
to be invoked once for each registration.

An B<AtExit> object can be created in any scope. When invoked as a
function, B<atexit> registers callbacks to be
executed at I<program-exit> time. But when invoked as an object-method
(using the C<$object-E<gt>method_name> syntax),
callbacks registered with an B<AtExit> object are executed at
I<object-destruction time>! The rules for order of execution of the
registered subroutines are the same for objects during
object-destruction, as for the program during program-termination.

The B<atexit> function/method should be passed a subroutine name or

lib/AtExit.pm  view on Meta::CPAN

removed from the front of the queue immediately before it is invoked).
Note that in both cases (program-exit, and object-destruction) the
subroutines in this queue are invoked in first-to-last order (the
I<reverse> order in which they were registered with B<atexit>).

=head2 Adding and removing callbacks during exit/destruction time.

The method B<ignore_when_exiting> specifies how exit-callback
registration and unregistration will be handled during program-exit
or object-destruction time, while exit-callbacks are in process
of being invoked.

When invoked as a class method (e.g., C<AtExit-E<gt>ignore_when_exiting>),
B<ignore_when_exiting> corresponds to the handling of calls to
B<atexit> and B<rmexit> during program-termination. But when invoked as

lib/AtExit.pm  view on Meta::CPAN

value will correspond to object-destruction processing for the given
object.

If, for any reason, the list of registered callback needs to be directly
accessed or manipulated, the B<exit_subs> function will return a reference
to the list of program-exit callbacks. When invoked as a method, B<exit_subs>
will return a reference to the list of object-destruction callbacks for the
corresponding object.

=head1 EXPORTS

For backward compatibility, B<atexit> and B<rmexit> are exported

 view all matches for this distribution


Attribute-Params-Validate

 view release on metacpan or  search on metacpan

lib/Attribute/Params/Validate.pm  view on Meta::CPAN

  {
      # insert code here
  }

  # for some reason Perl insists that the entire attribute be on one line
  sub foo2 : Validate( foo => { type => ARRAYREF }, bar => { can => [ 'print', 'flush', 'frobnicate' ] }, baz => { type => SCALAR, callbacks => { 'numbers only' => sub { shift() =~ /^\d+$/ }, 'less than 90' => sub { shift() < 90 } } } )
  {
      # insert code here
  }

  # note that this is marked as a method.  This is very important!

 view all matches for this distribution


Audio-FLAC-Decoder

 view release on metacpan or  search on metacpan

Decoder.xs  view on Meta::CPAN

	SkipUntilSpecification skip_specification;
	SkipUntilSpecification until_specification;

} flac_datasource;

/* start all the callbacks here. */
static void meta_callback(
	const decoder_t *decoder,
	const FLAC__StreamMetadata *metadata, void *client_data) {

	flac_datasource *datasource = (flac_datasource *)client_data;

 view all matches for this distribution


Audio-GtkGramofile

 view release on metacpan or  search on metacpan

GtkGramofile/GUI.pm  view on Meta::CPAN

}

sub connect_signals {
  my $self = shift;

  my @callbacks = qw(quit record play save tracksplit_browse start_tracksplit stop_tracksplit process_infile process_outfile
simple_median_filter double_median_filter simple_mean_filter rms_filter cond_median_filter cond_median2_filter 
cond_median3_filter simple_normalize_filter start_process stop_process);

  foreach my $callback (@callbacks) {
    $self->{$callback."_button"}->signal_connect('clicked', $self->{gtkgramofile}->{signals}->get_callback($callback), $self->{gtkgramofile}->{signals});
  }
  $self->{gramofile}->signal_connect('delete_event', $self->{gtkgramofile}->{signals}->get_callback("quit"));

  foreach my $check (qw(tracksplit_rms_file_check tracksplit_generate_graph_check)) {

 view all matches for this distribution


Audio-LADSPA

 view release on metacpan or  search on metacpan

Network/Network.pm  view on Meta::CPAN

	}
    }
    else {
	$plugin = Audio::LADSPA->plugin(@_)->new($self->{sample_rate});
    }
    $plugin->set_monitor($self);    # register callbacks.
    return $plugin;
}

sub graph {
    return $_[0]->{graph};

Network/Network.pm  view on Meta::CPAN

EXPR can be an Audio::LADSPA::Plugin object, an Audio::LADSPA::Plugin classname or any
expression supported by L<< Audio::LADSPA->plugin()|Audio::LADSPA/plugin >>.

Any $plugin added to a $network will have its monitor set to that $network. This
means that a $plugin cannot be in more than 1 Audio::LADSPA::Network at any given time, and that
all callbacks from the $plugin are handled by the $network. 

See also L<Audio::LADSPA::Plugin/SETTING CALLBACKS>.

=head2 has_plugin

 view all matches for this distribution


Audio-Radio-Sirius

 view release on metacpan or  search on metacpan

lib/Audio/Radio/Sirius.pm  view on Meta::CPAN

	verbosity	=> 0,
	_sequence	=> 0,
	_serial	=> undef,
	_lastack	=> -1,
	_lastreq	=> -1,
	_callbacks	=> {
		'channel_update'	=> undef,
	},
	_buffer	=> '',
);

lib/Audio/Radio/Sirius.pm  view on Meta::CPAN

}

=head2 set_callback (callback type, function reference)

When the tuner sends an update, such as new artist/title information on the current channel, it may be helpful to execute some code which handles this
event.  To accomidate this, you may define function callbacks activated when each event occurs.  Note that some of the parameters below are marked with 
an asterisk.  This indicates that they may be undefined when your function is called.  You should account for this in your callback function.

=head3 channel_update (channel, *pid, *artist, *title, *composer)

 $tuner->set_callback ('channel_update', \&channel);

lib/Audio/Radio/Sirius.pm  view on Meta::CPAN

sub set_callback {
	my $self = shift;
	if (!ref($self) eq 'CODE') { croak "$self isn't an object"; }
	my ($reqtype, $funcref) = @_;
	if (!ref $funcref) { croak "$funcref must be a reference to a function"; }
	if (!exists($DEFAULTS{'_callbacks'}{$reqtype}) ) { croak "$reqtype is not a supported update type"; }
	# validated enough for 'ya??

	$self->{'_callbacks'}{$reqtype} = $funcref;
}

=head2 verbosity (level)

Not to be confused with C<debug>, verbosity changes the updates the tuner sends.  By default, the tuner only sends updates for artist/title/PID

lib/Audio/Radio/Sirius.pm  view on Meta::CPAN

sub _call_channel_handler {
	my $self = shift;
	my ($channel) = @_;

	# update handler: ($channel, $pid, $artist, $title, $composer)
	my $handler = $self->{'_callbacks'}{'channel_update'};
	if (ref($handler)) {
		&$handler (
			$channel,
			$self->{'channels'}{$channel}{'pid'},
			$self->{'channels'}{$channel}{'artist'},

 view all matches for this distribution


Audio

 view release on metacpan or  search on metacpan

Change.log  view on Meta::CPAN


	Play of subranges

Change 2553 on 2002/12/17 by nick@dromedary

	Overview and range callbacks

Change 2552 on 2002/12/17 by nick@dromedary

	Basic scope

 view all matches for this distribution


Audit-DBI-TT2

 view release on metacpan or  search on metacpan

examples/js/jquery-1.9.1.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;

examples/js/jquery-1.9.1.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 ) {

examples/js/jquery-1.9.1.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

examples/js/jquery-1.9.1.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 = [];
				return this;
			},
			// Have the list do nothing anymore

examples/js/jquery-1.9.1.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 ) {
				args = args || [];
				args = [ context, args.slice ? args.slice() : args ];
				if ( list && ( !fired || stack ) ) {
					if ( firing ) {

examples/js/jquery-1.9.1.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;
			}
		};

examples/js/jquery-1.9.1.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

examples/js/jquery-1.9.1.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;
				},

examples/js/jquery-1.9.1.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

examples/js/jquery-1.9.1.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",

examples/js/jquery-1.9.1.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" :

examples/js/jquery-1.9.1.js  view on Meta::CPAN

						// retrieved directly we need to fire the callback
						setTimeout( callback );
					} else {
						handle = ++xhrId;
						if ( xhrOnUnloadAbort ) {
							// Create the active xhrs callbacks list if needed
							// and attach the unload handler
							if ( !xhrCallbacks ) {
								xhrCallbacks = {};
								jQuery( window ).unload( xhrOnUnloadAbort );
							}
							// Add to list of active xhrs callbacks
							xhrCallbacks[ handle ] = callback;
						}
						xhr.onreadystatechange = callback;
					}
				},

examples/js/jquery-1.9.1.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 );
}

examples/js/jquery-1.9.1.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 );
			}
		});

 view all matches for this distribution


Authen-CAS-UserAgent

 view release on metacpan or  search on metacpan

lib/Authen/CAS/UserAgent.pm  view on Meta::CPAN

#	password          => the password to use to login to the specified CAS server
#	pgt               => the pgt for a proxy login handler
#	proxy             => a boolean indicating this handler is a proxy login handler
#	restful           => a boolean indicating if the CAS server supports the RESTful API
#	callback          => a login callback to use for logging into CAS, it should return a ticket for the specified service
#	ticket_heuristics => an array of heuristic callbacks that are performed when searching for the service and ticket in a CAS response
#	strict            => only allow CAS login when the service is the same as the original url
sub attach_cas_handler($%) {
	my $self = shift;
	my (%opt) = @_;

lib/Authen/CAS/UserAgent.pm  view on Meta::CPAN

		ref($opt{'callback'}) eq 'CODE' ? $opt{'callback'}    :
		$opt{'proxy'}                   ? $proxyLoginCallback :
		$opt{'restful'}                 ? $restLoginCallback  :
		$defaultLoginCallback;

	# process any default config values for bundled callbacks/heuristics, we do this here
	# instead of in the callbacks to make default values available to custom
	# callbacks
	$opt{'ticket_heuristics'} = [$opt{'ticket_heuristics'}] if(ref($opt{'ticket_heuristics'}) ne 'ARRAY');
	push @{$opt{'ticket_heuristics'}}, $defaultTicketHeuristic;
	@{$opt{'ticket_heuristics'}} = grep {ref($_) eq 'CODE'} @{$opt{'ticket_heuristics'}};

	$opt{'param_heuristics'} = [$opt{'param_heuristics'}] if(ref($opt{'param_heuristics'}) ne 'ARRAY');

 view all matches for this distribution


Authen-SASL-Cyrus

 view release on metacpan or  search on metacpan

Cyrus.pod  view on Meta::CPAN

=over 4

=item callback ( NAME )

Tells if the named callback has a handler installed. The list of implemented
callbacks is "user", "auth", and "language". Others may be implemented in
future releases.

=item callback( NAME => VALUE,  NAME => VALUE, ... )

Sets the given callback(s) to the given value(s). See the C<Callbacks> section

 view all matches for this distribution


Authen-SASL-Perl-NTLM

 view release on metacpan or  search on metacpan

lib/Authen/SASL/Perl/NTLM.pm  view on Meta::CPAN

(Unfortunately, Authen::SASL currently doesn't tell you which SASL mechanism
is missing.)

=head1 CALLBACK

The callbacks used are:

=head2 Client

=over 4

 view all matches for this distribution


Authen-SASL-XS

 view release on metacpan or  search on metacpan

CHANGES  view on Meta::CPAN

0.11
added setpass and checkpass methods
added setpass callback
applied a patch by Graham Barr (found with google) for enabling GSSAPI
authentication (fix a problem in Security.pm)
added a check for undef return values when using sub-callbacks (Thanks
to Quanah Gibson-Mount for discovering this one)

0.10
Added the iplocalport and ipremote port to *_new methods, after filling
in the appropriate string (see doc) ASC is able to manage KERBEROS_V4

CHANGES  view on Meta::CPAN

0.09
Added callback documenation
Perl-Callback types (PVMG, PV, PVIV) handling extended

0.08-desy-internal
Almost complete rewrite of Perlcallbacks from Cyrus.xs.
SASL-Server functionality added, so servers written in Perl can use
SASL as Authentication Layer. Synchronize callbacks between Cyrus SASL
v1 and v2.
Many changes in the internal handling of sasl variables.
Documentation inside the XS-file, do motivate myself to write docs

0.07

 view all matches for this distribution


Authen-SASL

 view release on metacpan or  search on metacpan

lib/Authen/SASL/Perl/ANONYMOUS.pm  view on Meta::CPAN

This method implements the client part of the ANONYMOUS SASL algorithm,
as described in RFC 2245 resp. in IETF Draft draft-ietf-sasl-anon-XX.txt.

=head2 CALLBACK

The callbacks used are:

=over 4

=item authname

 view all matches for this distribution


Authen-Simple-DBM

 view release on metacpan or  search on metacpan

lib/Authen/Simple/DBM.pm  view on Meta::CPAN

    },
    type => {
        type      => Params::Validate::SCALAR,
        default   => 'SDBM',
        optional  => 1,
        callbacks => {
            'is either DB, GDBM, NDBM or SDBM' => sub {
                $_[0] =~ qr/^CDB|DB|GDBM|NDBM|SDBM$/;
            }
        }
    }

 view all matches for this distribution


Authen-Simple-Net

 view release on metacpan or  search on metacpan

lib/Authen/Simple/POP3.pm  view on Meta::CPAN

    },
    method => {
        type     => Params::Validate::SCALAR,
        default  => 'plain',
        optional => 1,
        callbacks => {
            'valid option' => sub {
                $_[0] =~ /^apop|plain|sasl$/;
            }
        }
    }    

 view all matches for this distribution



Authen-U2F

 view release on metacpan or  search on metacpan

examples/demoserver/u2f-api.js  view on Meta::CPAN

 * @private
 */
u2f.reqCounter_ = 0;

/**
 * A map from requestIds to client callbacks
 * @type {Object.<number,(function((u2f.Error|u2f.RegisterResponse))
 *                       |function((u2f.Error|u2f.SignResponse)))>}
 * @private
 */
u2f.callbackMap_ = {};

examples/demoserver/u2f-api.js  view on Meta::CPAN

      u2f.getMessagePort(function(port) {
        u2f.port_ = port;
        u2f.port_.addEventListener('message',
            /** @type {function(Event)} */ (u2f.responseHandler_));

        // Careful, here be async callbacks. Maybe.
        while (u2f.waitingForPort_.length)
          u2f.waitingForPort_.shift()(u2f.port_);
      });
    }
    u2f.waitingForPort_.push(callback);

 view all matches for this distribution


Aw

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

	- Aw::Event::getFIELD returns a hash with "value" and "type" keys.
	- added BEGIN blocks throughout.

0.10b Tue Mar 14 12:40:07 EST 2000

	- some memory leaks for variables in callbacks pushed onto Perl's stack.
	- The Aw::Log data type now includes maxMessagesize which has a default
	  value of 2048.  Methods getMessageSize and setMessageSize are provided
	  to manipulate this value.
	- "strict" added to all .pm files.
	- Makefile.PL is smart enough to know where default libraries and include

 view all matches for this distribution


AxKit-XSP-PerForm

 view release on metacpan or  search on metacpan

PerForm.pm  view on Meta::CPAN

PerForm tends to make life easier for you if your form data is coming from
different data sources, such as DBI, or even XML.

PerForm works as an XSP taglib, meaning you simply add some custom XML tags
to your XSP page, and PerForm does the rest. Well, almost... PerForm works
mainly by callbacks, as you will see below.

=head1 EXAMPLE FORM

Ignoring the outside XSP and namespace declarations, assuming the prefix "f"
is bound to the PerForm namespace:

PerForm.pm  view on Meta::CPAN

   <f:submit name="save" value="Save" goto="users.xsp" />
   <f:cancel name="cancel" value="Cancel" goto="home.html" />
  </f:form>

Now it is important to bear in mind that this is just the form, and alone it
is fairly useless. You also need to add callbacks. You'll notice with each
of these callbacks you recieve a C<$ctxt> object. This is simply an empty
hash-ref that you can use in the callbacks to maintain state. Actually
"empty" is an exhageration - it contains two entries always: C<Form> and
C<Apache>. "Form" is a simply a hashref of the entries in the form (actually
it is an Apache::Table object, which allows for supporting multi-valued
parameters). So for example, the firstname below is in
C<$ctxt->{Form}{firstname}>. "Apache" is the C<$r> apache request object for

PerForm.pm  view on Meta::CPAN

I<goto> attribute on the submit or cancel button, or implement a callback
and return a URI to redirect to.

=head1 THE CONTEXT OBJECT

Each of the form callbacks is passed a context object. This is a hashref you
are allowed to use to maintain state between your callbacks. There is a new
context object created for every form on your XSP page. There are two
entries filled in automatically into the hashref for you:

=over 4

PerForm.pm  view on Meta::CPAN

=head1 ARRAYED FORM ELEMENTS

Sometimes you need to display a list of items in your form where the number
of items is not known until runtime.  Use arrayed form elements to trigger
the same callback for each item in the list.  When setting up each element,
use an index to identify each member of the list.  The callbacks will be
passed the index as a parameter.  e.g.

Your form may have a section like this:

  <xsp:logic>

PerForm.pm  view on Meta::CPAN

be in the class you inherit from, reducing code duplication, memory usage,
and complexity.

=head1 SPECIFYING CALLBACKS

All of the documentation here uses the default callbacks which are implied
by the name of the form element you give. Unfortunately this makes it
difficult to have multiple elements with the same validation logic without
duplicating code. In order to get around this you can manually specify the
callbacks to use.

Every main tag supports both C<onvalidate> and C<onload> attributes which
specify perl function names to validate and load respectively. Submit
buttons support C<onsubmit> attributes. Cancel buttons support C<oncancel>
attributes. Forms themselves support both C<oncancel> and C<onsubmit>
attributes.

If a form is submitted without pressing a button (such as via JavaScript,
or by hitting <Enter>, then the form tag's C<onsubmit> callback will be
used. It is always sensible to define this to be one of your button's
submit callbacks.

All tags allow a C<disabled> attribute. Set this to a true value (i.e.
C<disabled="1">) to set the control to disabled. This will be interpreted
as a HTML 4.0 feature in the default perform stylesheet.

PerForm.pm  view on Meta::CPAN


=over 4

=item name (mandatory)

The name of the submit button. Used for the submit callbacks.

=item value

The text on the button, if you are using a browser generated button.

PerForm.pm  view on Meta::CPAN

=over 4

=item name (mandatory)

The name of the textfield. Should be unique to the entire XSP page, as
callbacks only use the widget name. Can also be used in
C<$ctxt-E<gt>{Form}{E<lt>nameE<gt>}> to retrieve the value.

=item default

A default value for the textfield.

PerForm.pm  view on Meta::CPAN

=head2 <f:single-select/>

A drop-down select list of items.

The single-select and multi-select (below) elements can be populated either
by callbacks or through embedded elements.

B<Attributes:>

=over 4

 view all matches for this distribution


B-C

 view release on metacpan or  search on metacpan

perloptree.pod  view on Meta::CPAN

=head2 Modules

The most important op tree module is L<B::Concise> by Stephen McCamant.

L<B::Utils> provides abstract-enough op tree grep's and walkers with
callbacks from the perl level.

L<Devel::Hook> allows adding perl hooks into the BEGIN, CHECK,
UNITCHECK, INIT blocks.

L<Devel::TypeCheck> tries to verify possible static typing for

 view all matches for this distribution


B-CompilerPhase-Hook

 view release on metacpan or  search on metacpan

lib/B/CompilerPhase/Hook.pm  view on Meta::CPAN


  # With apologies to the `BEGIN-UNITCHECK-CHECK-INIT-and-END` section of `perlmod`

=head1 DESCRIPTION

This module makes it possible to enqueue callbacks to be run during
the various Perl compiler phases, with the aim of doing multi-phase
meta programming in a reasonably clean way.

=head1 FUNCTIONS

lib/B/CompilerPhase/Hook.pm  view on Meta::CPAN

=over 4

=item L<Devel::Hook>

This module provides C<push> and C<unshift> access to the internal
arrays that hold the set of compiler phase callbacks. It relies on
you to do the right thing when choosing which of the two actions
(C<push> or C<unshift>) to take.

=back

 view all matches for this distribution


B-Hooks-AtRuntime

 view release on metacpan or  search on metacpan

lib/B/Hooks/AtRuntime.pm  view on Meta::CPAN

    my ($new) = @_;

    # By deleting the stash entry we ensure the only ref to the glob is
    # through the optree it was compiled into. This means that if that
    # optree is ever freed, the glob will disappear along with anything
    # closed over by the user's callbacks.
    delete $B::Hooks::AtRuntime::{hooks};

    no strict "refs";
    $new and *{"hooks"} = $new;
}

lib/B/Hooks/AtRuntime.pm  view on Meta::CPAN

    my $depth = count_BEGINs()
        or croak "You must call at_runtime at compile time";

    my $hk;
    unless ($hk = $Hooks[$depth]) {
        # Close over an array of callbacks so we don't need to keep
        # stuffing text into the buffer.
        my @hooks;
        $hk = $Hooks[$depth] = \@hooks;
        replace_hooks $hk;

 view all matches for this distribution


B-Hooks-EndOfScope

 view release on metacpan or  search on metacpan

lib/B/Hooks/EndOfScope/PP/FieldHash.pm  view on Meta::CPAN

# * %^H is deallocated on scope exit, so any references to it disappear
# * A lost weakref in a fieldhash causes the corresponding key to be deleted
# * Deletion of a key on a tied hash triggers DELETE
#
# Therefore the DELETE of a tied fieldhash containing a %^H reference will
# be the hook to fire all our callbacks.

fieldhash my %hh;
{
  package # hide from pause too
    B::Hooks::EndOfScope::PP::_TieHintHashFieldHash;

 view all matches for this distribution


B-Hooks-OP-Check-EntersubForCV

 view release on metacpan or  search on metacpan

lib/B/Hooks/OP/Check/EntersubForCV.pm  view on Meta::CPAN


__END__

=head1 NAME

B::Hooks::OP::Check::EntersubForCV - Invoke callbacks on construction of entersub OPs for certain CVs

=head1 SYNOPSIS

=head2 From Perl

 view all matches for this distribution


B-Hooks-OP-Check

 view release on metacpan or  search on metacpan

lib/B/Hooks/OP/Check.pm  view on Meta::CPAN

use strict;
use warnings;
package B::Hooks::OP::Check; # git description: 0.21-5-g968d5ca
# ABSTRACT: Wrap OP check callbacks

require 5.008001;
use parent qw/DynaLoader/;

our $VERSION = '0.22';

lib/B/Hooks/OP/Check.pm  view on Meta::CPAN


=encoding UTF-8

=head1 NAME

B::Hooks::OP::Check - Wrap OP check callbacks

=head1 VERSION

version 0.22

lib/B/Hooks/OP/Check.pm  view on Meta::CPAN

        CODE:
            hook_op_check_remove (OP_CONST, my_hook_id);

=head1 DESCRIPTION

This module provides a C API for XS modules to hook into the callbacks of
C<PL_check>.

L<ExtUtils::Depends> is used to export all functions for other XS modules to
use. Include the following in your Makefile.PL:

lib/B/Hooks/OP/Check.pm  view on Meta::CPAN


=head1 TYPES

=head2 typedef OP *(*hook_op_check_cb) (pTHX_ OP *, void *);

Type that callbacks need to implement.

=head2 typedef UV hook_op_check_id

Type to identify a callback.

 view all matches for this distribution


( run in 0.775 second using v1.01-cache-2.11-cpan-39bf76dae61 )