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


Data-Consumer

 view release on metacpan or  search on metacpan

lib/Data/Consumer.pm  view on Meta::CPAN

about how they got the piece, a task that should be handled by the framework.
The consumer subclasses assume that the resource can be modeled as a 
queue (that there is some ordering principle by which they can be processed 
in a predictable sequence). The consume pattern in full glory is something 
very close to the following following pseudo code. The items marked with 
asterisks are where user callbacks may be invoked:

    DO
        RESET TO THE BEGINNING OF THE QUEUE
	WHILE QUEUE NOT EMPTY AND CAN *PROCEED*
	    ACQUIRE NEXT ITEM TO PROCESS FROM QUEUE

lib/Data/Consumer.pm  view on Meta::CPAN

}

=head2 $consumer->fail($message)

Same as doing C<die($message)> from within a consume/process callback except
that no exception is thrown (no C<$SIG{__DIE__}> callbacks are invoked) and
the error is deferred until the callback actually returns.

Typically used as

    return $consumer->fail;

 view all matches for this distribution


Data-DPath

 view release on metacpan or  search on metacpan

lib/Data/DPath.pm  view on Meta::CPAN

 data structure,
 like:
 /method()
 ---------------------------------------------------------------------
 
 callbacks on         YES                  no
 not found keys
 
 ---------------------------------------------------------------------
 
 element "//"         no                   YES

 view all matches for this distribution


Data-Dump

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN


2010-06-09  Gisle Aas <gisle@ActiveState.com>

   Release 1.16

   Add support for filter callbacks
      - filters can modify how selected objects are dumped

   Various enhancements to how/when hash keys are quoted
      - don't quote keywords
      - don't quote words prefixed with "-"

 view all matches for this distribution


Data-Enumerable-Lazy

 view release on metacpan or  search on metacpan

lib/Data/Enumerable/Lazy.pm  view on Meta::CPAN

=head1 EXAMPLES

=head2 A basic range

This example implements a range generator from $from until $to. In order to
generate this range we define 2 callbacks: C<on_has_next()> and C<on_next()>.
The first one is used as point of truth whether the sequence has any more
non-iterated elements, and the 2nd one is here to return the next element in
the sequence and the one that changes the state of the internal sequence
iterator.

 view all matches for this distribution


Data-EventStream

 view release on metacpan or  search on metacpan

lib/Data/EventStream/Window.pm  view on Meta::CPAN

This document describes Data::EventStream::Window version 0.13

=head1 DESCRIPTION

This class represents time window for which aggregator aggregates data.
Normally window objects are passed to aggregators' callbacks and user has no need to build them himself.

=head1 METHODS

=cut

 view all matches for this distribution


Data-Hive

 view release on metacpan or  search on metacpan

lib/Data/Hive/PathPacker/Flexible.pm  view on Meta::CPAN

use strict;
use warnings;
package Data::Hive::PathPacker::Flexible 1.015;
# ABSTRACT: a path packer that can be customized with callbacks

use parent 'Data::Hive::PathPacker';

#pod =head1 DESCRIPTION
#pod
#pod This class provides the Data::Hive::PathPacker interface, and the way in which
#pod paths are packed and unpacked can be defined by callbacks set during
#pod initialization.
#pod
#pod =method new
#pod
#pod   my $path_packer = Data::Hive::PathPacker::Flexible->new( \%arg );

lib/Data/Hive/PathPacker/Flexible.pm  view on Meta::CPAN

#pod =begin :list
#pod
#pod = escape and unescape
#pod
#pod These coderefs are used to escape and path parts so that they can be split and
#pod joined without ambiguity.  The callbacks will be called like this:
#pod
#pod   my $result = do {
#pod     local $_ = $path_part;
#pod     $store->$callback( $path_part );
#pod   }

lib/Data/Hive/PathPacker/Flexible.pm  view on Meta::CPAN


=encoding UTF-8

=head1 NAME

Data::Hive::PathPacker::Flexible - a path packer that can be customized with callbacks

=head1 VERSION

version 1.015

=head1 DESCRIPTION

This class provides the Data::Hive::PathPacker interface, and the way in which
paths are packed and unpacked can be defined by callbacks set during
initialization.

=head1 PERL VERSION

This library should run on perls released even a long time ago.  It should work

lib/Data/Hive/PathPacker/Flexible.pm  view on Meta::CPAN

=over 4

=item escape and unescape

These coderefs are used to escape and path parts so that they can be split and
joined without ambiguity.  The callbacks will be called like this:

  my $result = do {
    local $_ = $path_part;
    $store->$callback( $path_part );
  }

 view all matches for this distribution


Data-InputMonster

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN


0.009     2013-07-05 21:37:09 America/New_York
          update bugtracker, repackage

0.008     2008-09-23
          pass field name to store callbacks

0.007     2008-09-19
          allow dig to accept a non-ref arg

0.005     2008-09-19
          pass hashref of data (field_name) to sourcers

0.004     2008-09-17
          pass input to store callbacks

0.003     2008-09-12
          add no_default_for option to consume

0.002     2008-09-12

 view all matches for this distribution


Data-JPack

 view release on metacpan or  search on metacpan

share/js/02-chunkloader.js  view on Meta::CPAN

    parts.pop();
    
    
    this.buildRoot=parts.join("/")+"/";
    window.build_root=this.buildRoot;
    //List of objects or callbacks to call as data is being loaded

		this.manifest=[];
    this.path_manifest={};

		this.chunksExpected=100;

 view all matches for this distribution


Data-Localize

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

0.00022 Nov 07 2011
  * Very small optimization.
  * Doc fixes on performance

0.00021 Oct 13 2011
  * Add a way to insert callbacks that can be used in the formatters (doy)

0.00020 Apr 10 2011
  * add_localizer($object) was not working (rt #67337). Reported by Klaus Ita
  * FormFu 0.09 and up were failing (rt #67347). Reported by Andreas Koenig
  * Tests failed if Config::Any was not installed (rt #67342). Reported by Andreas Koenig

 view all matches for this distribution


Data-Math

 view release on metacpan or  search on metacpan

lib/Data/Math.pm  view on Meta::CPAN

     improve memory efficiency

  o  try an operator overload interface

  o  examine possibility of arbitrary user-defineable
     operations (pattern/action callbacks?)

=head1 AUTHOR

Joseph Brenner, E<lt>doom@kzsu.stanford.eduE<gt>

 view all matches for this distribution


Data-Model

 view release on metacpan or  search on metacpan

lib/Data/Model.pm  view on Meta::CPAN

        validate(
            @p, {
                index => {
                    type     => HASHREF | UNDEF,
                    optional => 1,
                    callbacks => {
                        has_index_name => sub {
                            return 1 unless $_[0];
                            return 0 unless scalar(@{ [ %{ $_[0] } ] }) == 2;
                            my($name) = %{ $_[0] };
                            $schema->has_index($name);

 view all matches for this distribution


Data-Monad-CondVar

 view release on metacpan or  search on metacpan

lib/Data/Monad/CondVar.pm  view on Meta::CPAN


=over 4

=item $cv = as_cv($cb->($cv))

A helper for rewriting functions using callbacks to ones returning CVs.

  my $cv = as_cv { http_get "http://google.ne.jp", $_[0] };
  my ($data, $headers) = $cv->recv;

=item $cv = cv_unit(@vs)

 view all matches for this distribution


Data-Object-Role-Tryable

 view release on metacpan or  search on metacpan

lib/Data/Object/Role/Tryable.pm  view on Meta::CPAN


  try(CodeRef | Str $method) : InstanceOf['Data::Object::Try']

The try method takes a method name or coderef and returns a
L<Data::Object::Try> object with the current object passed as the invocant
which means that C<try> and C<finally> callbacks will receive that as the first
argument.

=over 4

=item try example #1

 view all matches for this distribution


Data-Object-Try

 view release on metacpan or  search on metacpan

lib/Data/Object/Try.pm  view on Meta::CPAN

The result method executes the try/catch/default/finally logic and returns
either 1) the return value from the successfully tried operation 2) the return
value from the successfully matched catch condition if an exception was thrown
3) the return value from the default catch condition if an exception was thrown
and no catch condition matched. When invoked, the C<try> and C<finally>
callbacks will received an C<invocant> if one was provided to the constructor,
the default C<arguments> if any were provided to the constructor, and whatever
arguments were passed directly to this method.

=over 4

 view all matches for this distribution


Data-Object-Types

 view release on metacpan or  search on metacpan

lib/Data/Object/Types/Keywords.pm  view on Meta::CPAN


=head2 is_all_of

  is_all_of(CodeRef @checks) : CodeRef

The is_all_of function accepts one or more callbacks and returns truthy if all
of the callbacks return truthy.

=over 4

=item is_all_of example #1

lib/Data/Object/Types/Keywords.pm  view on Meta::CPAN


=head2 is_any_of

  is_any_of(CodeRef @checks) : CodeRef

The is_any_of function accepts one or more callbacks and returns truthy if any
of the callbacks return truthy.

=over 4

=item is_any_of example #1

lib/Data/Object/Types/Keywords.pm  view on Meta::CPAN


=head2 is_one_of

  is_one_of(CodeRef @checks) : CodeRef

The is_one_of function accepts one or more callbacks and returns truthy if
only one of the callbacks return truthy.

=over 4

=item is_one_of example #1

 view all matches for this distribution


Data-ObjectDriver

 view release on metacpan or  search on metacpan

lib/Data/ObjectDriver.pm  view on Meta::CPAN

of I<Class> itself. See TRIGGERS for the available triggers.

=head2 Class->call_trigger($trigger, [@callback_params])

Invokes the triggers watching class I<Class>. The parameters to send to the
callbacks (in addition to I<Class>) are specified in I<@callback_params>. See
TRIGGERS for the available triggers.

=head2 $obj->save

Saves the object I<$obj> to the database.

lib/Data/ObjectDriver.pm  view on Meta::CPAN

besides I<$obj>, if any, are passed as I<@callback_params>. See TRIGGERS for
the available triggers.

=head1 TRIGGERS

I<Data::ObjectDriver> provides a trigger mechanism by which callbacks can be
called at certain points in the life cycle of an object. These can be set on a
class as a whole or individual objects (see USAGE).

Triggers can be added and called for these events:

lib/Data/ObjectDriver.pm  view on Meta::CPAN

Note I<pre_search> should only be used as a trigger on a class, as I<search> is
never invoked on specific objects.

=over

The return values from your callbacks are ignored.

Note that the invocation of callbacks is the responsibility of the object
driver. If you implement a driver that does not delegate to
I<Data::ObjectDriver::Driver::DBI>, it is I<your> responsibility to invoke the
appropriate callbacks with the I<call_trigger> method.

=back

=back

 view all matches for this distribution


Data-Overlay

 view release on metacpan or  search on metacpan

lib/Data/Overlay.pm  view on Meta::CPAN

=back

=cut

for my $action (keys %action_map) {
    # debuggable names for callbacks (not the used perl names)
    subname "$action-overlay", $action_map{$action};

    # XXX
    warn "$action not in \@action_order"
        if ! grep { $action eq $_ } @action_order;

 view all matches for this distribution


Data-Processor

 view release on metacpan or  search on metacpan

lib/Data/Processor.pm  view on Meta::CPAN

}

=head2 transform_data

Transform one key in the data according to rules specified
as callbacks that themodule calls for you.
Transforms the data in-place.

 my $validator = Data::Processor::Validator->new($schema, data => $data)
 my $error_string = $processor->transform($key, $schema_key, $value);

 view all matches for this distribution


Data-Region

 view release on metacpan or  search on metacpan

Region.pm  view on Meta::CPAN

=back


=head2 Associating behavior with Data::Regions

The following methods allow you to associate data and callbacks to a
tree of Data::Regions, and to request a Data::Region to perform its tree of
callbacks. 

=over 4

=item  $r->data( [$reference] )

 view all matches for this distribution


Data-SExpression

 view release on metacpan or  search on metacpan

lib/Data/SExpression.pm  view on Meta::CPAN

    return !ref($thing) ||
            ref($thing) eq "GLOB" ||
            ref($thing) eq 'Data::SExpression::Symbol';;
}

=head1 Data::SExpression::Parser callbacks

These are for internal use only, and are used to generate the data
structures returned by L</read>. 

=head2 new_cons CAR CDR

 view all matches for this distribution





Data-Startup

 view release on metacpan or  search on metacpan

t/ExtUtils/SVDmaker/Algorithm/Diff.pm  view on Meta::CPAN


In addition to the 
C<DISCARD_A>,
C<DISCARD_B>, and
C<MATCH>
callbacks supported by C<traverse_sequences>, C<traverse_balanced> supports
a C<CHANGE> callback indicating that one element got C<replaced> by another:

  traverse_sequences( \@seq1, \@seq2,
                     { MATCH => $callback_1,
                       DISCARD_A => $callback_2,

t/ExtUtils/SVDmaker/Algorithm/Diff.pm  view on Meta::CPAN


sub traverse_sequences
{
	my $a                 = shift;                                  # array ref
	my $b                 = shift;                                  # array ref
	my $callbacks         = shift || {};
	my $keyGen            = shift;
	my $matchCallback     = $callbacks->{'MATCH'} || sub { };
	my $discardACallback  = $callbacks->{'DISCARD_A'} || sub { };
	my $finishedACallback = $callbacks->{'A_FINISHED'};
	my $discardBCallback  = $callbacks->{'DISCARD_B'} || sub { };
	my $finishedBCallback = $callbacks->{'B_FINISHED'};
	my $matchVector = _longestCommonSubsequence( $a, $b, $keyGen, @_ );

	# Process all the lines in @$matchVector
	my $lastA = $#$a;
	my $lastB = $#$b;

t/ExtUtils/SVDmaker/Algorithm/Diff.pm  view on Meta::CPAN


sub traverse_balanced
{
	my $a                 = shift;                                  # array ref
	my $b                 = shift;                                  # array ref
	my $callbacks         = shift || {};
	my $keyGen            = shift;
	my $matchCallback     = $callbacks->{'MATCH'} || sub { };
	my $discardACallback  = $callbacks->{'DISCARD_A'} || sub { };
	my $discardBCallback  = $callbacks->{'DISCARD_B'} || sub { };
	my $changeCallback    = $callbacks->{'CHANGE'};
	my $matchVector = _longestCommonSubsequence( $a, $b, $keyGen, @_ );

	# Process all the lines in match vector
	my $lastA = $#$a;
	my $lastB = $#$b;

 view all matches for this distribution


Data-TableAutoSum

 view release on metacpan or  search on metacpan

TableAutoSum.pm  view on Meta::CPAN

    return 1;
}

use constant ROW_COL_TYPE => {
    type      => SCALAR | ARRAYREF,
    callbacks =>  {
        # scalar value
        'integer'          => sub { implies !ref($_[0]) => $_[0] =~ $RE{num}{int} },
            'greater than 0'   => sub { implies !ref($_[0]) => ($_[0] =~ $RE{num}{int}) && (int($_[0]) > 0) },

        # array ref

TableAutoSum.pm  view on Meta::CPAN


sub data : lvalue {
    my $self = shift; 
    my ($row, $col, $value) = validate_pos( @_,
        {type => SCALAR,
         callbacks => {'is a row' => sub {$self->{rowset}->contains(shift())}}
        },
        {type => SCALAR,
         callbacks => {'is a col' => sub {$self->{colset}->contains(shift())}}
        },
        0
    );
    $self->{data}->{$row}->{$col} = $value if defined $value;
    $self->{data}->{$row}->{$col};

 view all matches for this distribution


Data-TableReader-Decoder-HTML

 view release on metacpan or  search on metacpan

lib/Data/TableReader/Decoder/HTML.pm  view on Meta::CPAN

=head1 METHODS

=head2 parse

Unfortunately, I'm not aware of any HTML parsers that properly parse a stream on demand rather
than using callbacks, so this module simply parses all the HTML up-front and iterates the perl
data structure.  This would be a problem if you have more HTML than can fit into memory
comfortably.  Buf if that's the case, you have bigger problems ;-)

This method is called automatically the first time you invoke the iterator.  You might choose
to call it earlier in order to report errors better.

 view all matches for this distribution


Data-TableReader

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

 - Decoder::Mock now correctly handles empty tables (no rows)

Version 0.020 - 2024-04-30
 - Rename on_validation_fail -> on_validation_error
   The action codes are the same, but the callback has different arguments.
   Old callbacks applied using the attribute name 'on_validation_fail' will
   continue to work.
 - New iterator attribute 'dataset_idx', for keeping track of which dataset
   you're on.
 - Unimplemented Iterator->seek now dies as per the documentation.
   (no built-in iterator lacked support for seek, so unlikely to matter)

 view all matches for this distribution


Data-Trace

 view release on metacpan or  search on metacpan

lib/Data/Tie/Watch.pm  view on Meta::CPAN

Note: This is a copy of Tk's Tie::Watch.
Copied to avoid the Tk depedency.

This class module binds one or more subroutines of your devising to a
Perl variable.  All variables can have B<FETCH>, B<STORE> and
B<DESTROY> callbacks.  Additionally, arrays can define B<CLEAR>,
B<DELETE>, B<EXISTS>, B<EXTEND>, B<FETCHSIZE>, B<POP>, B<PUSH>,
B<SHIFT>, B<SPLICE>, B<STORESIZE> and B<UNSHIFT> callbacks, and hashes
can define B<CLEAR>, B<DELETE>, B<EXISTS>, B<FIRSTKEY> and B<NEXTKEY>
callbacks.  If these term are unfamiliar to you, I I<really> suggest
you read L<perltie>.

With Data::Tie::Watch you can:

 . alter a variable's value

lib/Data/Tie/Watch.pm  view on Meta::CPAN

Callback format is patterned after the Perl/Tk scheme: supply either a
code reference, or, supply an array reference and pass the callback
code reference in the first element of the array, followed by callback
arguments.  (See examples in the Synopsis, above.)

Tie::Watch provides default callbacks for any that you fail to
specify.  Other than negatively impacting performance, they perform
the standard action that you'd expect, so the variable behaves
"normally".  Once you override a default callback, perhaps to insert
debug code like print statements, your callback normally finishes by
calling the underlying (overridden) method.  But you don't have to!

lib/Data/Tie/Watch.pm  view on Meta::CPAN

Watch constructor.

The *real* constructor is Data::Tie::Watch->base_watch(),
invoked by methods in other Watch packages, depending upon the variable's
type.  Here we supply defaulted parameter values and then verify them,
normalize all callbacks and bind the variable to the appropriate package.

The watchpoint constructor method that accepts option/value pairs to
create and configure the Watch object.  The only required option is
B<-variable>.

lib/Data/Tie/Watch.pm  view on Meta::CPAN

    $watch_obj->{-value} = $$variable;

    bless $watch_obj, $class;
}

# Default scalar callbacks.

sub Destroy { undef %{ $_[0] } }
sub Fetch   { $_[0]->{-value} }
sub Store   { $_[0]->{-value} = $_[1] }

lib/Data/Tie/Watch.pm  view on Meta::CPAN

    my $watch_obj = Data::Tie::Watch->base_watch( %args );

    bless $watch_obj, $class;
}

# Default array callbacks.

sub Clear     { $_[0]->{-ptr} = () }
sub Delete    { delete $_[0]->{-ptr}->[ $_[1] ] }
sub Destroy   { undef %{ $_[0] } }
sub Exists    { exists $_[0]->{-ptr}->[ $_[1] ] }

lib/Data/Tie/Watch.pm  view on Meta::CPAN

    my $watch_obj = Data::Tie::Watch->base_watch( %args );

    bless $watch_obj, $class;
}

# Default hash callbacks.

sub Clear    { $_[0]->{-ptr} = () }
sub Delete   { delete $_[0]->{-ptr}->{ $_[1] } }
sub Destroy  { undef %{ $_[0] } }
sub Exists   { exists $_[0]->{-ptr}->{ $_[1] } }

 view all matches for this distribution


Data-Transformer

 view release on metacpan or  search on metacpan

lib/Data/Transformer.pm  view on Meta::CPAN

    'My::Class' => sub { shift->set_foo('bar') }
 );

=head1 DESCRIPTION

=head2 Data type callbacks

The basic idea is that you provide a callback subroutine for each type
of data that you wish to affect or collect information from.

The constructor, C<new()>, expects a hash with at least one of the

 view all matches for this distribution


( run in 0.808 second using v1.01-cache-2.11-cpan-9b1e4054eb1 )