view release on metacpan or search on metacpan
lib/App/Milter/Limit.pm view on Meta::CPAN
# make sure the permissions are correct
chown $$conf{user}, $$conf{group}, $path
or die "chown($path): $!";
}
my %callbacks = (
envfrom => \&_envfrom_callback
);
$milter->register($$conf{name}, \%callbacks, SMFI_CURR_ACTS);
debug("registered as $$conf{name}");
}
# drop user/group privs.
view all matches for this distribution
view release on metacpan or search on metacpan
t/lib/UploadMultipartTest.pm view on Meta::CPAN
} else {
return;
}
};
my @callbacks;
for (@orig_parts) {
my $res = $j->next;
cmp_deeply $res,
App::MtAws::QueueJobResult->full_new(
task => {
t/lib/UploadMultipartTest.pm view on Meta::CPAN
cb => test_coderef,
cb_task_proxy => test_coderef,
},
code => JOB_OK,
);
push @callbacks, $res->{task}{cb_task_proxy};
}
local *App::MtAws::TreeHash::calc_tree = sub { shift->{tree} = "my_final_hash" };
local *App::MtAws::TreeHash::get_final_hash = sub { shift->{tree} };
while (my $cb = shift @callbacks) {
$cb->();
if (@callbacks) {
expect_wait($j);
} else {
cmp_deeply my $finish_resp = $j->next,
App::MtAws::QueueJobResult->full_new(
task => {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/ChordPro/Wx/Utils.pm view on Meta::CPAN
# Create / update menu bar.
#
# setup_menubar is called by main ctor, update_menubar by the refresh
# methods of main and panels.
# This is intended to be called by a panel, but the actual menu bar is
# attached to the top level frame. The callbacks are routed to the
# methods in the panel, if possible.
use constant
{ M_ALL => 0xff,
M_MAIN => 0x01,
view all matches for this distribution
view release on metacpan or search on metacpan
public/javascripts/ace.js view on Meta::CPAN
(function(){function o(n){var i=e;n&&(e[n]||(e[n]={}),i=e[n]);if(!i.define||!i.define.packaged)t.original=i.define,i.define=t,i.define.packaged=!0;if(!i.require||!i.require.packaged)r.original=i.require,i.require=r,i.require.packaged=!0}var ACE_NAMES...
window.require(["ace/ace"], function(a) {
if (a) {
a.config.init(true);
a.define = window.define;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Nag.pm view on Meta::CPAN
$synopsis .= ' ...' if length($text) - length($synopsis) > 4;
return ( $verbosity, $text, $synopsis, $seconds );
}
# extract useful bits out of a time expression
# tried to do this with a more readable recursive regex and callbacks but got
# OOM errors at unpredictable intervals so I gave up
sub _parse_time {
my %props;
given ( $_[0] ) {
when (/^(\d++)([hms])$/i) { @props{qw(time unit)} = ( $1, lc $2 ) }
view all matches for this distribution
view release on metacpan or search on metacpan
share/public/swagger-ui/swagger-ui-bundle.js view on Meta::CPAN
*/,e.exports=function(e,t){if(!o.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,i=n in document;if(!i){var a=document.createElement("div");a.setAttribute(n,"return;"),i="function"==typeof a[n]}return!i&&r&&"wheel"===e&&(i=docum...
/*!
* https://github.com/Starcounter-Jack/JSON-Patch
* (c) 2017 Joachim Wester
* MIT license
*/function o(e,t){return r.call(e,t)}function i(e){if(Array.isArray(e)){for(var t=new Array(e.length),n=0;n<t.length;n++)t[n]=""+n;return t}if(Object.keys)return Object.keys(e);t=[];for(var r in e)o(e,r)&&t.push(r);return t}function a(e){return-1===...
/*!
* cookie
* Copyright(c) 2012-2014 Roman Shtylman
* Copyright(c) 2015 Douglas Christopher Wilson
* MIT Licensed
share/public/swagger-ui/swagger-ui-bundle.js view on Meta::CPAN
* Copyright(c) 2015 Gregory Jacobs <greg@greg-jacobs.com>
* MIT Licensed. http://www.opensource.org/licenses/mit-license.php
*
* https://github.com/gregjacobs/Autolinker.js
*/
var e,t,n,r,o=function(e){o.Util.assign(this,e)};return o.prototype={constructor:o,urls:!0,email:!0,twitter:!0,newWindow:!0,stripPrefix:!0,truncate:void 0,className:"",htmlParser:void 0,matchParser:void 0,tagBuilder:void 0,link:function(e){for(var t=...
//# sourceMappingURL=swagger-ui-bundle.js.map
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/PM/Announce.pm view on Meta::CPAN
}
has logger => qw/is ro isa Log::Dispatch lazy_build 1/;
sub _build_logger {
my $self = shift;
my $logger = Log::Dispatch->new( callbacks => sub {
my $message = join ' ',
"[@{[ DateTime->now->set_time_zone( 'local' ) ]}]",
"[$_[3]]",
"$_[1]\n",
;
view all matches for this distribution
view release on metacpan or search on metacpan
t/oddmuse-wiki.pl view on Meta::CPAN
}
}
}
my @need_cache = keys %todo;
if (keys %todo > 1) { # try parallel access if available
eval { # see code example in LWP::Parallel, not LWP::Parallel::UserAgent (no callbacks here)
require LWP::Parallel::UserAgent;
my $pua = LWP::Parallel::UserAgent->new();
foreach my $uri (keys %todo) {
if (my $res = $pua->register(HTTP::Request->new('GET', $uri))) {
$str .= $res->error_as_HTML;
view all matches for this distribution
view release on metacpan or search on metacpan
script/platform-info view on Meta::CPAN
# }
# elsif (@val == 1) {
# return $val[0];
# }
# else {
# Carp::croak("filter_json_single_key_object callbacks must not return more than one scalar");
# }
# }
#
# my @val = $cb_object->($o) if ($cb_object);
# if (@val == 0) {
script/platform-info view on Meta::CPAN
# }
# elsif (@val == 1) {
# return $val[0];
# }
# else {
# Carp::croak("filter_json_object callbacks must not return more than one scalar");
# }
# }
#
#
# sub PP_decode_box {
view all matches for this distribution
view release on metacpan or search on metacpan
- Fix missing name for numeric 001 under --trace. Also depend on
IRC::Utils 0.07 for even more numeric names.
- Avoid custom stringifications when dumping objects with --trace
0.38 Tue Apr 26 22:03:37 GMT 2011
- Replace status callbacks with irc_plugin_status events
- Send an irc_network event when the network name changes
- Enabling tracing in --interactive after startup wasn't working
0.37 Mon Apr 25 23:59:48 GMT 2011
- Preserve symlinks in all supplied filenames
view all matches for this distribution
view release on metacpan or search on metacpan
lib/PrimaX/InputHistory.pm view on Meta::CPAN
return %profile;
}
# Changes the contents of the evaluation line to the one stored in the history.
# This is used for the up/down key callbacks for the evaluation line. The
# currentRevisions array holds the revisions to the history, and it is reset
# every time the user runs the evaluation line.
sub move_line {
my ($self, $requested_move) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Prove/Elasticsearch/Parser.pm view on Meta::CPAN
sub new {
my ($class, $opts) = @_;
$opts = clone $opts; #Convenience, if we are passing over and over again...
#Load our callbacks
$opts->{'callbacks'} = {
'test' => \&testCallback,
'comment' => \&commentCallback,
'unknown' => \&unknownCallback,
'bailout' => \&bailoutCallback,
'EOF' => \&EOFCallback,
view all matches for this distribution
view release on metacpan or search on metacpan
lib/TAP/Harness/MultipleConfig.pm view on Meta::CPAN
use ConfigCache;
sub new {
my ($self, $params) = @_;
$params->{callbacks} = +{
after_test => sub {
my ($filenames) = @_;
my $config = ConfigCache->get_config_by_filename($filenames->[0]);
ConfigCache->push_configs($config);
},
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
xt/author/pod_spelling_system.t view on Meta::CPAN
TODO
filename
filenames
login
callback
callbacks
standalone
VMS
hostname
hostnames
TCP
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/RabbitTail/FileTailer.pm view on Meta::CPAN
backoff_increment => 0.1,
max_sleep => 10,
fn => $somefile,
cd => sub { warn("Got line " . $_[0]) },
);
$tailer->tail; # Sets up watcher to fire callbacks, returns
# Rest of your code.
# Enter event loop.
AnyEvent->condvar->recv;
view all matches for this distribution
view release on metacpan or search on metacpan
.claude/skills/perl-io-async-future/SKILL.md view on Meta::CPAN
}
```
**Rules:**
- Store the *whole chain* on the object (`$self->{_reconnect_future}`), not just the leaf.
- `weaken` `$self` inside callbacks â otherwise the chain holds the object alive forever.
- Always `delete $self->{_reconnect_future}` in both `on_done` and `on_fail`, or you'll guard out future reconnects with `return if $self->{_reconnect_future}`.
- On disconnect, **cancel the old `_connect_future`** so its async sub unwinds:
```perl
if (my $f = delete $self->{_connect_future}) {
$f->fail("disconnected: $reason") unless $f->is_ready;
view all matches for this distribution
view release on metacpan or search on metacpan
xt/author/pod_spelling_system.t view on Meta::CPAN
TODO
filename
filenames
login
callback
callbacks
standalone
VMS
hostname
hostnames
TCP
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/RoboBot/Network/IRC.pm view on Meta::CPAN
$_->join for @{$self->channels};
}
sub disconnect {
# TODO: remove callbacks
# call client->disconnect
}
sub kick {
my ($self, $response, $nick, $message) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/SeismicUnixGui/big_streams/iBottomMute.pl view on Meta::CPAN
=cut
=head2 sub set_pick
callbacks
send gather number to $iBM
delete output of previous semblance
plus more callbacks following...
=cut
sub set_pick {
lib/App/SeismicUnixGui/big_streams/iBottomMute.pl view on Meta::CPAN
In this case the $variable is empty
1. increment gather
Exit if beyond last gather
2. reset prompt
3. Otherwise display the first semblance
4 ... see following callbacks
=cut
sub set_next {
print("Next...\n");
view all matches for this distribution
view release on metacpan or search on metacpan
local/lib/perl5/Net/SFTP/Foreign.pm view on Meta::CPAN
or die "ls failed";
When both C<no_wanted> and C<wanted> rules are used, the C<no_wanted>
rule is applied first and then the C<wanted> one (order is important
if the callbacks have side effects, experiment!).
=item ordered =E<gt> 1
the list of entries is ordered by filename.
local/lib/perl5/Net/SFTP/Foreign.pm view on Meta::CPAN
operations (for instance C<remove> or C<open>) affecting the same
directory are intermixed.
This flag ensures that no callback call (C<wanted>, C<no_wanted>) is
performed in the middle of reading a directory and has to be set if
any of the callbacks can modify the file system.
=item realpath =E<gt> 1
for every file object, performs a realpath operation and populates the
C<realpath> entry.
local/lib/perl5/Net/SFTP/Foreign.pm view on Meta::CPAN
These options have the same effect as on the C<ls> method, allowing to
filter out unwanted entries (note that filename keys contain B<full
paths> here).
The callbacks can also be used to perform some action instead of
creating the full listing of entries in memory (that could use huge
amounts of RAM for big file trees):
$sftp->find($src_dir,
wanted => sub {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/SimpleScan.pm view on Meta::CPAN
use Module::Pluggable search_path => [qw(App::SimpleScan::Plugin)];
use base qw(Class::Accessor);
__PACKAGE__->mk_accessors(qw(sub_engine tests test_count
next_line_callbacks _deps));
$|++; ##no critic
use App::SimpleScan::TestSpec;
lib/App/SimpleScan.pm view on Meta::CPAN
################################
# Basic class methods.
# Create the object.
# - load and install plugins
# - make object available to test specs for callbacks
# - clear the tests and test count
# - process the command-line options
# - return the object
sub new {
my ($class) = @_;
lib/App/SimpleScan.pm view on Meta::CPAN
$self->_deps(Graph->new);
$self->sub_engine($sub_engine);
# initialize fields first; plugins may expect good values.
$self->next_line_callbacks([]);
$self->tests([]);
$self->test_count(0);
$self->{InputQueue} = [];
# Load and install the plugins.
lib/App/SimpleScan.pm view on Meta::CPAN
# from the magic input filehandle.
sub next_line {
my ($self) = shift;
my $next_line;
# Call and plugin-installed input callbacks.
# These can do whatever they like to the line stack, the
# object, etc.
foreach my $callback (@ {$self->next_line_callbacks() }) {
$callback->($self);
}
# If we have lines on the input queue, read from there.
if (defined $self->{InputQueue}->[0] ) {
lib/App/SimpleScan.pm view on Meta::CPAN
=head2 new
Creates a new instance of the application. Also invokes
all of the basic setup so that when C<go> is called, all
of the plugins are available and all callbacks are in place.
=head2 Instance methods
=head3 Execution methods
lib/App/SimpleScan.pm view on Meta::CPAN
Standard plugin methods that App::SimpleScan will look for;
none of these is required, though you should choose to
implement the ones that you actually need.
=head2 Basic callbacks
=head3 init
The C<init> class method is called by C<App:SimpleScan>
when the plugin class is loaded; the C<App::SimpleScan>
view all matches for this distribution
view release on metacpan or search on metacpan
bin/simplenotesync view on Meta::CPAN
Log::Dispatch::File->new(
name => 'debug_file',
min_level => 'debug',
filename => $PROGNAME . '_debug.log',
newline => 1,
callbacks => $sub,
));
}
Log::Any::Adapter->set('Dispatch', dispatcher => $logger);
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/SVN/Dump/Walker.pm view on Meta::CPAN
$SVN::Dump::Walker::VERSION = '1.000';
}
# Base class for higher-level objects that process SVN::Dump streams.
# Does some fundamental handling of SVN::Dump events, then provides
# slightly higher level events to callbacks.
# TODO - Basically done. Think twice if you think it requires
# modification.
use lib qw(../SVN-Dump/lib ./lib);
lib/SVN/Dump/Walker.pm view on Meta::CPAN
C<svn_dump_filename> should contain the name of a Subversion dump
file. It's required.
C<include_regexp> may contain a regular expression defining the
directories and files to include in the walk. Those that don't match
won't trigger callbacks. Optional.
=head2 Public Methods
=head3 walk
view all matches for this distribution
view release on metacpan or search on metacpan
socialcalc/simpleedit15.pl view on Meta::CPAN
var heights=[];
function showvalue() {
addmsg(spreadsheet.editor.colwidth, true);
}
// formatting callbacks
// Simple ExpandWiki code for testing
SocialCalc.Callbacks.expand_wiki = function(displayvalue, sheetobj, linkstyle, valueformat) {
view all matches for this distribution
view release on metacpan or search on metacpan
inc/File/Find/Rule.pm view on Meta::CPAN
subs stack is exposed in quite the right way. Maybe it'd be better as
a private global hash. Something like $subs{$self} = []; and in
C<DESTROY>, delete $subs{$self}.
That'd make compiling subrules really much easier (no need to pass
@subs in for context), and things that work via a mix of callbacks and
code fragments are possible (you'd probably want this for the stat
tests).
Need to check this currently working version in before I play with
that though.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Spec/Run.pm view on Meta::CPAN
my $plugins = $self->spec->plugins || [];
for my $plugin (@$plugins) {
$plugin->init_run($self);
}
my @callbacks;
my $subscriber_events = $self->subscribers;
for my $key (qw/ global_options print_output /) {
my $subscribers = $subscriber_events->{ $key };
for my $sub (@$subscribers) {
my $plugin = $sub->{plugin};
my $method = $sub->{method};
my $callback = sub {
$plugin->$method( run => $self, @_);
};
push @callbacks, $callback;
}
$self->response->add_callbacks($key => \@callbacks);
}
my $argv = $self->argv;
unless ($argv) {
$argv = \@ARGV;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/TLSMe/Connection.pm view on Meta::CPAN
...
);
=head1 DESCRIPTION
Object-Value that holds handles, callbacks and other information associated with
proxy-backend connection.
=head1 METHODS
=head2 C<new>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Tel/Expect.pm view on Meta::CPAN
use strict;
use warnings;
=head1 NAME
App::Tel::Expect - Monkeypatching Expect to support callbacks and large buffer reads
=cut
use POSIX qw(:sys_wait_h :unistd_h); # For WNOHANG and isatty
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Termcast.pm view on Meta::CPAN
# eventually be deprecated in favor of moving the termcast interaction
# code out to an App::Termcast::Writer module or something, and
# this module should be a simple wrapper that combines that module
# with Term::Filter.
Term::Filter::Callback->new(
callbacks => {
setup => sub {
my ($term) = @_;
$term->add_input_handle($self->socket);
},
winch => sub {
view all matches for this distribution