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


Data-Censor

 view release on metacpan or  search on metacpan

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

        sensitive_fields => [ qw(card_number password) ],

        # Specify text to replace their values with:
        replacement => '(Sensitive data hidden)',

        # Or specify callbacks for each field name which return the "censored"
        # value - in this case, masking a card number (PAN) to show only the
        # last four digits:
        replacement_callbacks => {
            card_number => sub {
                my $pan = shift;
                return "x" x (length($pan) - 4) . substr($pan, -4, 4);
            },
        },

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

against each key to see if it's considered sensitive.

=item replacement

The string to replace each value with.  Any censoring callback provided in
C<replacement_callbacks> which matches this key will take precedence over this
straightforward value.

=item replacement_callbacks

A hashref of key => sub {...}, where each key is a column name to match, and the
coderef takes the uncensored value and returns the censored value, letting you
for instance mask a card number but leave the last 4 digits visible.

If you provide both C<replacement> and C<replacement_callbacks>, any callback
defined which matches the key being considered takes precedence.

=back

=cut

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

              cvv          cvv2         ccv
            )
        };
    }

    if ( is_hashref $args{replacement_callbacks} ) {
        $self->{replacement_callbacks} = $args{replacement_callbacks};
    }
    if ( exists $args{replacement} ) {
        $self->{replacement} = $args{replacement};
    } else {
        $self->{replacement} = 'Hidden (looks potentially sensitive)';

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

          (    $self->{is_sensitive_field}
            && $self->{is_sensitive_field}{ lc $key } )
          or ( $self->{censor_regex} && $key =~ $self->{censor_regex} );

        # OK, censor this
        if ( $self->{replacement_callbacks}{ lc $key } ) {
            $data->{$key} = $self->{replacement_callbacks}{ lc $key }->(
                $data->{$key}
            );
            $censored++;
        } else {
            $data->{$key} = $self->{replacement};

 view all matches for this distribution


Data-Chronicle

 view release on metacpan or  search on metacpan

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


    $subscriber->subscribe("category1", "name2", sub { print 'Hello World' });

=head2 L<Data::Chronicle::Subscriber/unsubscribe>

Given a category, name, clears the callbacks associated with the specified category and name.

    $subscriber->unsubscribe("category1", "name2");

=head1 EXAMPLES

 view all matches for this distribution


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


( run in 0.751 second using v1.01-cache-2.11-cpan-10033ea8487 )