view release on metacpan or search on metacpan
example/test_wrapper.pl view on Meta::CPAN
view all matches for this distribution
4950515253545556575859test_module
=>
{
description
=>
'module'
,
apropos
=> [
qw(module)
],
# save some private data we'll be re-using from the callbacks
_MODULE_RUNNER
=>
sub
{
my
(
$self
,
$command
,
$arguments
) =
@_
;
eval
<<
'EOE'
;
view release on metacpan or search on metacpan
view all matches for this distribution
15916159171591815919159201592115922159231592415925Ev(
'T'
)
# KeyPress
# Perl Tk Event Info (PTk,bin methods,Ev)
# Stop events in callback.
return
# Exits only current sub
Tk::break
# Stops all callbacks for an event
# View order of bindings for a widget (PTk,bin methods,Ev)
for
$b
->bindtags
"$_: "
,
$b
->
bind
(
$_
)
for
$b
->bindtags
view release on metacpan or search on metacpan
t/lib/Test/WithCallback/Command/lol.pm view on Meta::CPAN
view all matches for this distribution
345678910111213use
Test::WithCallback -command;
sub
opt_spec {
return
(
[
"even|e=s"
,
"an even number"
, {
callbacks
=> {
valid_email
=>
sub
{
return
!(
$_
[0] % 2) }
}
}],
);
}
view release on metacpan or search on metacpan
lib/App/Codit/Ext/CoditMDI.pm view on Meta::CPAN
view all matches for this distribution
634635636637638639640641642643644# my ($self, $name, $key) = @_;
}
=back
Macros are callbacks executed in the background. For each line in the document the macro is linked to,
the callback is executed with a reference to the text widget and the line number as parameter.
the macro ends after the last line has been processed. Codit uses macro callback to do tasks like show
leading and trailing tabs and spaces and reparing indentation.
=over 4
view release on metacpan or search on metacpan
lib/App/Config/Chronicle.pm view on Meta::CPAN
view all matches for this distribution
109110111112113114115116117118119
isa
=>
'Data::Chronicle::Writer'
,
);
=head2 chronicle_subscriber
The chronicle connection that can notify via callbacks when particular configuration items have a new value set. It should be an instance of L<Data::Chronicle::Subscriber>.
=cut
has
chronicle_subscriber
=> (
is
=>
'ro'
,
view release on metacpan or search on metacpan
lib/App/DBBrowser/GetContent/Parse.pm view on Meta::CPAN
view all matches for this distribution
5253545556575859606162
grep
{
length
$sf
->{o}{csv_in}{
$_
} }
keys
%{
$sf
->{o}{csv_in}}
};
require
Text::CSV_XS;
my
$csv
= Text::CSV_XS->new(
$options
) or
die
Text::CSV_XS->error_diag();
$csv
->callbacks(
error
=>
sub
{
my
(
$code
,
$str
,
$pos
,
$rec
,
$fld
) =
@_
;
if
(
$code
== 2012 ) {
# no warnings for end of data.
# 2012 "EOF - End of data in parsing input stream"
}
view release on metacpan or search on metacpan
lib/App/Dochazka/CLI/Util.pm view on Meta::CPAN
view all matches for this distribution
645646647648649650651652653654655sub
truncate_to {
my
(
$str
,
$mlen
) = validate_pos(
@_
,
{
type
=> SCALAR|UNDEF },
{
callbacks
=> {
'greater than or equal to zero'
=>
sub
{
shift
() >= 0 },
},
optional
=> 1,
type
=> SCALAR,
},
view release on metacpan or search on metacpan
lib/App/Dochazka/REST/Model/Employee.pm view on Meta::CPAN
view all matches for this distribution
557558559560561562563564565566567
die
"Unexpected _privsched_change_during_range_result: status payload is not an array!"
;
}
my
(
$plval
) = validate_pos( @{
$status
->payload },
{
type
=> SCALAR,
callbacks
=> {
'non-negative integer'
=>
sub
{
$_
[0] >= 0 }
}
},
);
return
$plval
;
view release on metacpan or search on metacpan
lib/App/Easer/V2.pm view on Meta::CPAN
view all matches for this distribution
913914915916917918919920921922
$csources
->{current} = \
@csources
;
}
}
}
# propagate pre-execute callbacks down the line
$child
->pre_execute_schedule(
$self
->pre_execute);
return
$child
;
}
view release on metacpan or search on metacpan
scripts/es-storage-overview.pl view on Meta::CPAN
view all matches for this distribution
1314151617181920212223#------------------------------------------------------------------------#
# Argument Collection
my
(
$opt
,
$usage
) = describe_options(
'%c %o'
,
[
'sort=s'
,
"sort by name or size, default: name"
,
{
default
=>
'name'
,
callbacks
=> {
'must be name or size'
=>
sub
{
$_
[0] =~ /^name|size$/ } } }
],
[
'asc'
,
"Sort ascending (default by name)"
],
[
'desc'
,
"Sort descending (default by size)"
],
[
'limit=i'
,
"Limit to showing only this many, ie top N"
, {
default
=> 0 }],
[
'raw'
,
"Display numeric data without rollups"
],
view release on metacpan or search on metacpan
lib/App/Env.pm view on Meta::CPAN
400401402403404405406407408409410# mostly a duplicate of what's in str(). ick.
my
%opt
= Params::Validate::validate(
@opts
,
{
Exclude
=> {
callbacks
=> {
'type'
=> \
&App::Env::_Util::exclude_param_check
},
default
=>
undef
,
},
AllowIllegalVariableNames
=> {
optional
=> 1,
default
=> !!1,
lib/App/Env.pm view on Meta::CPAN
view all matches for this distribution
472473474475476477478479480481482# this is a bit messy.
my
%opt
= Params::Validate::validate(
@opts
,
{
Exclude
=> {
callbacks
=> {
'type'
=> \
&App::Env::_Util::exclude_param_check
},
optional
=> 1,
},
AllowIllegalVariableNames
=> {
optional
=> 1,
default
=> !!0,
view release on metacpan or search on metacpan
lib/App/ErrorCalculator.pm view on Meta::CPAN
view all matches for this distribution
41424344454647484950$window
->signal_connect(
delete_event
=> \
&_delete_event
);
# Here we connect the "destroy" event to a signal handler.
# This event occurs when we call Gtk2::Widget::destroy on the window,
# or if we return FALSE in the "delete_event" callback. Perl supports
# anonymous subs, so we can use one of them for one line callbacks.
$window
->signal_connect(
destroy
=>
sub
{ Gtk2->main_quit; });
my
$table
= Gtk2::Table->new(5, 4, FALSE);
$window
->add(
$table
);
view release on metacpan or search on metacpan
share/status/app/lib/angular/angular-animate.js view on Meta::CPAN
230231232233234235236237238239* the element's CSS class attribute value and then run the matching animation event function (
if
found).
* In other words,
if
the CSS classes present on the animated element match any of the JavaScript animations then the callback function will
* be executed. It should be also noted that only simple, single class selectors are allowed (compound class selectors are not supported).
*
* Within a JavaScript animation, an object containing various event callback animation functions is expected to be returned.
* As explained above, these callbacks are triggered based on the animation event. Therefore
if
an enter animation is run,
* and the JavaScript animation is found, then the enter callback will handle that animation (in addition to the CSS keyframe animation
* or transition code that is
defined
via a stylesheet).
*
*/
share/status/app/lib/angular/angular-animate.js view on Meta::CPAN
652653654655656657658659660661662//we prefix and suffix the current className value
with
spaces to avoid substring
//lookups of className tokens
var futureClassName =
' '
+ currentClassName +
' '
;
if
(ngAnimateState.running) {
//
if
an animation is currently running on the element then lets take the steps
//to cancel that animation and fire any required callbacks
$timeout
.cancel(ngAnimateState.closeAnimationTimeout);
cleanup(element);
cancelAnimations(ngAnimateState.animations);
//
if
the class is removed during the reflow then it will revert the styles temporarily
share/status/app/lib/angular/angular-animate.js view on Meta::CPAN
view all matches for this distribution
764765766767768769770771772773774function fireDoneCallbackAsync() {
doneCallback &&
$timeout
(doneCallback, 0, false);
}
//timeouts containing multiple callbacks.
function fireDOMOperation() {
if
(!fireDOMOperation.hasBeenRun) {
fireDOMOperation.hasBeenRun = true;
domOperation();
}
view release on metacpan or search on metacpan
lib/App/FetchwareX/HTMLPageSync.pm view on Meta::CPAN
102103104105106107108109110111112EOF
descriptions
=> {
page_name
=>
<<EOA,
page_name simply names the HTML page the Fetchwarefile is responsible for
downloading, analyzing via optional callbacks, and copying to your
destination_directory.
EOA
html_page_url
=> <<EOA,
html_page_url is HTMLPageSync's lookup_url equivalent. It specifies a HTTP url
that returns a page of HTML that can be easily parsed of links to later
lib/App/FetchwareX/HTMLPageSync.pm view on Meta::CPAN
157158159160161162163164165166167
extension_name(__PACKAGE__);
opening_message(<<EOM);
HTMLPageSync
's new command is not as sophistocated as Fetchware'
s. Unless you
only want to download images, you will have to get your hands dirty, and code up
some custom Perl callbacks to customize HTMLPageSync's behavior. However, it
will ask you quite nicely the basic options, so
if
those are all you need, then
this command will successfully generate a HTMLPageSync Fetchwarefile
for
you.
After it lets you choose the easy options of page_name, html_page_url,
and destination_directory, it will give you an opportunity to modify the
lib/App/FetchwareX/HTMLPageSync.pm view on Meta::CPAN
725726727728729730731732733734735destination_directory
'wallpapers'
;
# pretend to be firefox
user_agent
'Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20100101 Firefox/15.0.1'
;
# Customize the callbacks.
html_treebuilder_callback
sub
{
# Get one HTML::Element.
my
$h
=
shift
;
# Return true or false to indicate if this HTML::Element shoudd be a
lib/App/FetchwareX/HTMLPageSync.pm view on Meta::CPAN
12501251125212531254125512561257125812591260
return
undef
;
#false
}
}
};
=item B<7. Specify an optional download_links_callbacks>
C<download_links_callback> specifies an optional anonymous Perl subroutine
reference that will replace the default one that HTMLPageSync uses. The default
one removes the HTML::Element skin each download link is wrapped in, because of
the use of L<HTML::TreeBuilder>. This simply strips off the object-oriented crap
lib/App/FetchwareX/HTMLPageSync.pm view on Meta::CPAN
13611362136313641365136613671368136913701371=head3 lookup()
lookup() is overridden, and downloads the C<html_page_url>, which is the main
configuration option that HTMLPageSync uses. Then lookup() parses that
C<html_page_url>, and determines what the download urls should be. If the
C<html_trebuilder_callback> and C<download_links_callbacks> exist, then they are
called to customize lookup()'s default bahavior. See their descriptions below.
=head3 download()
download() downloads the array ref of download links that lookup() returns.
lib/App/FetchwareX/HTMLPageSync.pm view on Meta::CPAN
view all matches for this distribution
14761477147814791480148114821483148414851486=head1 CAVEATS
Certain features of App::FetchwareX::HTMLPageSync require knowledge of the Perl
programming language in order for you to make use of them. However, this is
limited to optional callbacks that are not needed for most uses. These features
are the C<html_treebuilder_callback> and C<download_links_callback> callbacks.
=head1 AUTHOR
David Yingling <deeelwy@gmail.com>
view release on metacpan or search on metacpan
lib/App/Framework/Feature/Run.pm view on Meta::CPAN
view all matches for this distribution
2223242526272829303132=head1 DESCRIPTION
Provides for external command running from within an application.
An external conmmand may be run using this feature, and the output from the command may be returned for additional processing. The feature
also provides timed execution (aborting after a certain time), exit code status, and callbacks that can be defined to be called during execution
and/or after program completion.
=head2 Arguments
The access method for this feature (called as B<$app-E<gt>run()>) allows the complete run settings to be specified as a HASH. The call sets
view release on metacpan or search on metacpan
lib/App/HTTP_Proxy_IMP/IMP.pm view on Meta::CPAN
view all matches for this distribution
521522523524525526527528529530531############################################################################
# callback from IMP
# process return types and trigger type specific callbacks on (pre)pass/replace
############################################################################
sub
_imp_callback {
my
$self
=
shift
;
my
%fwd
;
# forwarded data, per dir
view release on metacpan or search on metacpan
share/static/jquery.jgrowl.js view on Meta::CPAN
192021222324252627282930* - Fixed IE bug
with
the filter CSS attribute (special thanks to gotwic)
* - Update IE opacity CSS
* - Changed font sizes to
use
"em"
, and only set the base style
*
* Changes in 1.2.3
* - The callbacks now receive the container as a parameter
after
the options parameter
* - beforeOpen and beforeClose now check the
return
value,
if
it's false - the notification does
* not
continue
. The
open
callback will also halt execution
if
it returns false.
* - Fixed bug where containers would get confused
* - Expanded the pause functionality to pause an entire container.
*
share/static/jquery.jgrowl.js view on Meta::CPAN
6667686970717273747576*
* Changes in 1.0.3
* - Fixed bug
with
options persisting across notifications
* - Fixed theme application bug
* - Simplified some selectors and manipulations.
* - Added beforeOpen and beforeClose callbacks
* - Reorganized some lines of code to be more readable
* - Removed unnecessary this.defaults context
* - If corners plugin is present, it's now customizable.
* - Customizable
open
animation.
* - Customizable
close
animation.
share/static/jquery.jgrowl.js view on Meta::CPAN
view all matches for this distribution
8182838485868788899091* - All CSS styling is now external.
* - Added a theme parameter which specifies a secondary class
for
styling, such
* that notifications can be customized in appearance on a per message basis.
* - Notification life span is now customizable on a per message basis.
* - Added the ability to disable the global closer, enabled by
default
.
* - Added callbacks
for
when
a notification is opened or closed.
* - Added callback
for
the global closer.
* - Customizable animation speed.
* - jGrowl now set itself up and tears itself down.
*
* Changes in 1.0.1:
view release on metacpan or search on metacpan
lib/App/JESP/Cmd.pm view on Meta::CPAN
view all matches for this distribution
25262728293031323334sub
global_opt_spec {
my
(
$self
) =
@_
;
return
(
[
"verbose|v"
,
"log additional output"
],
[
"lib-inc|I=s@"
,
"additional \@INC dirs"
, {
callbacks
=> {
'always fine'
=>
sub
{
unshift
@INC
, @{
$_
[0]}; } }
} ],
$self
->SUPER::global_opt_spec,
);
}
view release on metacpan or search on metacpan
lib/App/Kit/Role/Log.pm view on Meta::CPAN
view all matches for this distribution
4950515253545556575859# ro-NOOP: }
else
{
return
Log::Dispatch->new(
outputs
=> [ [
"Screen"
,
min_level
=>
"notice"
,
"newline"
=> 1 ] ],
callbacks
=>
sub
{
# ? TODO break this out into a thing consumable by Log::Dispatch::Config above ?
my
%info
=
@_
;
my
$short
=
$info
{
'level'
};
$short
=
substr
(
$info
{
'level'
}, 0, 5 ) eq
'emerg'
?
'M'
:
uc
(
substr
(
$short
, 0, 1 ) );
$short
=
" ã’\xc2\xa0$short"
;
# Unicode: \x{33D2} utf-8: \xe3\x8f\x92
view release on metacpan or search on metacpan
lib/App/MFILE/WWW/Resource.pm view on Meta::CPAN
view all matches for this distribution
512513514515516517518519520521522$r
.=
'map: {'
;
$r
.=
" '*': { 'jquery': 'jquery-private' },"
;
$r
.=
" 'jquery-private': { 'jquery': 'jquery' }"
;
$r
.=
'},'
;
# callbacks for showing module loading progress
$r
.=
'onNodeCreated: function(node, config, moduleName, url) {'
;
$r
.=
" var t = document.getElementById('myLoadProgress'),"
;
$r
.=
" m = '';"
;
$r
.=
" m = 'module ' + moduleName + ' is about to be loaded';"
;
$r
.=
" console.log(m);"
;
view release on metacpan or search on metacpan
lib/App/MHFS.pm view on Meta::CPAN
136137138139140141142143144145146sub
register_child {
my
(
$self
,
$pid
,
$cb
) =
@_
;
$self
->{
'children'
}{
$pid
} =
$cb
;
}
sub
run_dead_children_callbacks {
my
(
$self
) =
@_
;
while
(
my
$chld
=
shift
(@{
$self
->{
'deadchildren'
}})) {
say
"PID "
.
$chld
->[1] .
' running SIGCHLD cb'
;
$chld
->[0](
$chld
->[2]);
}
lib/App/MHFS.pm view on Meta::CPAN
view all matches for this distribution
266267268269270271272273274275276
elsif
(! $!{EINTR}){
say
"Poll ERROR $!"
;
#return undef;
}
$self
->run_dead_children_callbacks;
}
sub
run {
my
(
$self
,
$loop_interval
) =
@_
;
my
$default_lp_interval
=
$loop_interval
// -1;
view release on metacpan or search on metacpan
lib/App/Milter/Limit.pm view on Meta::CPAN
view all matches for this distribution
110111112113114115116117118119120121122123124
# figure out the connection from sendmail
$milter
->auto_setconn(
$$conf
{name})
or croak
"auto_setconn failed"
;
}
my
%callbacks
= (
envfrom
=> \
&_envfrom_callback
);
$milter
->register(
$$conf
{name}, \
%callbacks
, SMFI_CURR_ACTS);
debug(
"registered as $$conf{name}"
);
}
# drop user/group privs.
view release on metacpan or search on metacpan
t/lib/UploadMultipartTest.pm view on Meta::CPAN
7172737475767778798081
}
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
view all matches for this distribution
919293949596979899100101102103104105106107108109
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 release on metacpan or search on metacpan
lib/ChordPro/Wx/Utils.pm view on Meta::CPAN
view all matches for this distribution
5455565758596061626364# 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 release on metacpan or search on metacpan
public/javascripts/ace.js view on Meta::CPAN
view all matches for this distribution
123456(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 release on metacpan or search on metacpan
lib/App/Nag.pm view on Meta::CPAN
view all matches for this distribution
127128129130131132133134135136137
$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 release on metacpan or search on metacpan
share/public/swagger-ui/swagger-ui-bundle.js view on Meta::CPAN
6566676869707172737475*/,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...
/*!
* (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
view all matches for this distribution
87888990919293* Copyright(c) 2015 Gregory Jacobs <greg
@greg
-jacobs.com>
* MIT Licensed. http://www.opensource.org/licenses/mit-license.php
*
*/
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 release on metacpan or search on metacpan
lib/App/PM/Announce.pm view on Meta::CPAN
view all matches for this distribution
103104105106107108109110111112113}
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 release on metacpan or search on metacpan
t/oddmuse-wiki.pl view on Meta::CPAN
view all matches for this distribution
10201021102210231024102510261027102810291030
}
}
}
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)
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 release on metacpan or search on metacpan
script/platform-info view on Meta::CPAN
25582559256025612562256325642565256625672568# }
# 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
view all matches for this distribution
25702571257225732574257525762577257825792580# }
# elsif (@val == 1) {
# return $val[0];
# }
# else {
# Carp::croak("filter_json_object callbacks must not return more than one scalar");
# }
# }
#
#
# sub PP_decode_box {