view release on metacpan or search on metacpan
lib/Grid/Request.pm view on Meta::CPAN
$logger->debug("Setting the command executable.");
my ($error, $diagnosis) = drmaa_set_attribute($jt, $DRMAA_REMOTE_COMMAND, $WORKER);
_throw_drmaa("Could not set command executable.") if $error;
# Calculate how many workers we need. First, calculate the number of iterations by
# examining the mw arguments
my $min_count;
foreach my $param ($cmd->params()) {
if ($param->type() ne "PARAM") {
my $count = $param->count();
lib/Grid/Request.pm view on Meta::CPAN
# Approach for master/worker (mw) jobs:
#
# 1. For each parameter, create an argument that contains the argument type, and a
# list of the values to iterate over
# 2. Calculate the minimum number of iterations from the parameters. In other words,
# if there is a mismatch, then you have to take the lowest number of parameters
# so that all parameters have defined siblings.
# 3. Based on the number of iterations N, launch a number of workers on the grid to
# process these where the number is some function of N, f(N).
# 4. Pass the path of the exe to the worker program, so that it knows what to execute
# The worker will know what portion of the work to do by the task id that the DRM
# gives it. In SGE, this is done with an environment variable: SGE_TASK_ID.
# 5. Worker will replace $(Index) and $(Name) placeholders with the iteration number or
# or the value itself in the output file, error file, input file, args, etc...
#
# General form:
# /path/to/worker <executable> <iterations> <workers> \
# param:blah_blah_blah \
# dir:<directory>:blah_blah_blah \
# file:<file>:blah_blah_blah
#
# Example: /path/to/worker /path/to/user/command 1000 5 \
view all matches for this distribution
view release on metacpan or search on metacpan
t/MyTestHelpers.pm view on Meta::CPAN
use Exporter;
use vars qw(@ISA @EXPORT_OK %EXPORT_TAGS);
@ISA = ('Exporter');
@EXPORT_OK = qw(findrefs
main_iterations
warn_suppress_gtk_icon
glib_gtk_versions
any_signal_connections
nowarnings);
%EXPORT_TAGS = (all => \@EXPORT_OK);
t/MyTestHelpers.pm view on Meta::CPAN
#-----------------------------------------------------------------------------
# Gtk/Glib helpers
# Gtk 2.16 can go into a hard loop on events_pending() / main_iteration_do()
# if dbus is not running, or something like that. In any case limiting the
# iterations is good for test safety.
#
sub main_iterations {
require Test::More;
my $count = 0;
if (DEBUG) { Test::More::diag ("main_iterations() ..."); }
while (Gtk2->events_pending) {
$count++;
Gtk2->main_iteration_do (0);
if ($count >= 500) {
Test::More::diag ("main_iterations(): oops, bailed out after $count events/iterations");
return;
}
}
Test::More::diag ("main_iterations(): ran $count events/iterations");
}
# warn_suppress_gtk_icon() is a $SIG{__WARN__} handler which suppresses spam
# from Gtk trying to make you buy the hi-colour icon theme. Eg,
#
t/MyTestHelpers.pm view on Meta::CPAN
while (! $done) {
if (DEBUG >= 2) { Test::More::diag ("wait_for_event() iteration $count"); }
Gtk2->main_iteration;
$count++;
}
Test::More::diag ("wait_for_event(): '$signame' ran $count events/iterations\n");
$widget->signal_handler_disconnect ($sig_id);
Glib::Source->remove ($timer_id);
}
view all matches for this distribution
view release on metacpan or search on metacpan
t/MyTestHelpers.pm view on Meta::CPAN
#
# use Exporter;
# use vars qw(@ISA @EXPORT_OK %EXPORT_TAGS);
# @ISA = ('Exporter');
# @EXPORT_OK = qw(findrefs
# main_iterations
# warn_suppress_gtk_icon
# glib_gtk_versions
# any_signal_connections
# nowarnings);
# %EXPORT_TAGS = (all => \@EXPORT_OK);
t/MyTestHelpers.pm view on Meta::CPAN
#-----------------------------------------------------------------------------
# Gtk/Glib helpers
# Gtk 2.16 can go into a hard loop on events_pending() / main_iteration_do()
# if dbus is not running, or something like that. In any case limiting the
# iterations is good for test safety.
#
sub main_iterations {
my $count = 0;
if (DEBUG) { MyTestHelpers::diag ("main_iterations() ..."); }
while (Gtk2->events_pending) {
$count++;
Gtk2->main_iteration_do (0);
if ($count >= 500) {
MyTestHelpers::diag ("main_iterations(): oops, bailed out after $count events/iterations");
return;
}
}
MyTestHelpers::diag ("main_iterations(): ran $count events/iterations");
}
# warn_suppress_gtk_icon() is a $SIG{__WARN__} handler which suppresses spam
# from Gtk trying to make you buy the hi-colour icon theme. Eg,
#
t/MyTestHelpers.pm view on Meta::CPAN
while (! $done) {
if (DEBUG >= 2) { MyTestHelpers::diag ("wait_for_event() iteration $count"); }
Gtk2->main_iteration;
$count++;
}
MyTestHelpers::diag ("wait_for_event(): '$signame' ran $count events/iterations\n");
$widget->signal_handler_disconnect ($sig_id);
Glib::Source->remove ($timer_id);
}
view all matches for this distribution
view release on metacpan or search on metacpan
t/MyTestHelpers.pm view on Meta::CPAN
# uncomment this to run the ### lines
#use Smart::Comments;
@ISA = ('Exporter');
@EXPORT_OK = qw(findrefs
main_iterations
warn_suppress_gtk_icon
glib_gtk_versions
any_signal_connections
nowarnings);
%EXPORT_TAGS = (all => \@EXPORT_OK);
t/MyTestHelpers.pm view on Meta::CPAN
#-----------------------------------------------------------------------------
# Gtk/Glib helpers
# Gtk 2.16 can go into a hard loop on events_pending() / main_iteration_do()
# if dbus is not running, or something like that. In any case limiting the
# iterations is good for test safety.
#
sub main_iterations {
my $count = 0;
if (DEBUG) { MyTestHelpers::diag ("main_iterations() ..."); }
while (Gtk2->events_pending) {
$count++;
Gtk2->main_iteration_do (0);
if ($count >= 500) {
MyTestHelpers::diag ("main_iterations(): oops, bailed out after $count events/iterations");
return;
}
}
MyTestHelpers::diag ("main_iterations(): ran $count events/iterations");
}
# warn_suppress_gtk_icon() is a $SIG{__WARN__} handler which suppresses spam
# from Gtk trying to make you buy the hi-colour icon theme. Eg,
#
t/MyTestHelpers.pm view on Meta::CPAN
while (! $done) {
if (DEBUG >= 2) { MyTestHelpers::diag ("wait_for_event() iteration $count"); }
Gtk2->main_iteration;
$count++;
}
MyTestHelpers::diag ("wait_for_event(): '$signame' ran $count events/iterations\n");
$widget->signal_handler_disconnect ($sig_id);
Glib::Source->remove ($timer_id);
}
view all matches for this distribution
view release on metacpan or search on metacpan
t/MyTestHelpers.pm view on Meta::CPAN
#
# use Exporter;
# use vars qw(@ISA @EXPORT_OK %EXPORT_TAGS);
# @ISA = ('Exporter');
# @EXPORT_OK = qw(findrefs
# main_iterations
# warn_suppress_gtk_icon
# glib_gtk_versions
# any_signal_connections
# nowarnings);
# %EXPORT_TAGS = (all => \@EXPORT_OK);
t/MyTestHelpers.pm view on Meta::CPAN
#-----------------------------------------------------------------------------
# Gtk/Glib helpers
# Gtk 2.16 can go into a hard loop on events_pending() / main_iteration_do()
# if dbus is not running, or something like that. In any case limiting the
# iterations is good for test safety.
#
sub main_iterations {
my $count = 0;
if (DEBUG) { MyTestHelpers::diag ("main_iterations() ..."); }
while (Gtk2->events_pending) {
$count++;
Gtk2->main_iteration_do (0);
if ($count >= 500) {
MyTestHelpers::diag ("main_iterations(): oops, bailed out after $count events/iterations");
return;
}
}
MyTestHelpers::diag ("main_iterations(): ran $count events/iterations");
}
# warn_suppress_gtk_icon() is a $SIG{__WARN__} handler which suppresses spam
# from Gtk trying to make you buy the hi-colour icon theme. Eg,
#
t/MyTestHelpers.pm view on Meta::CPAN
while (! $done) {
if (DEBUG >= 2) { MyTestHelpers::diag ("wait_for_event() iteration $count"); }
Gtk2->main_iteration;
$count++;
}
MyTestHelpers::diag ("wait_for_event(): '$signame' ran $count events/iterations\n");
$widget->signal_handler_disconnect ($sig_id);
Glib::Source->remove ($timer_id);
}
view all matches for this distribution
view release on metacpan or search on metacpan
t/MyTestHelpers.pm view on Meta::CPAN
#
# use Exporter;
# use vars qw(@ISA @EXPORT_OK %EXPORT_TAGS);
# @ISA = ('Exporter');
# @EXPORT_OK = qw(findrefs
# main_iterations
# warn_suppress_gtk_icon
# glib_gtk_versions
# any_signal_connections
# nowarnings);
# %EXPORT_TAGS = (all => \@EXPORT_OK);
t/MyTestHelpers.pm view on Meta::CPAN
#-----------------------------------------------------------------------------
# Gtk/Glib helpers
# Gtk 2.16 can go into a hard loop on events_pending() / main_iteration_do()
# if dbus is not running, or something like that. In any case limiting the
# iterations is good for test safety.
#
sub main_iterations {
my $count = 0;
if (DEBUG) { MyTestHelpers::diag ("main_iterations() ..."); }
while (Gtk2->events_pending) {
$count++;
Gtk2->main_iteration_do (0);
if ($count >= 500) {
MyTestHelpers::diag ("main_iterations(): oops, bailed out after $count events/iterations");
return;
}
}
MyTestHelpers::diag ("main_iterations(): ran $count events/iterations");
}
# warn_suppress_gtk_icon() is a $SIG{__WARN__} handler which suppresses spam
# from Gtk trying to make you buy the hi-colour icon theme. Eg,
#
t/MyTestHelpers.pm view on Meta::CPAN
while (! $done) {
if (DEBUG >= 2) { MyTestHelpers::diag ("wait_for_event() iteration $count"); }
Gtk2->main_iteration;
$count++;
}
MyTestHelpers::diag ("wait_for_event(): '$signame' ran $count events/iterations\n");
$widget->signal_handler_disconnect ($sig_id);
Glib::Source->remove ($timer_id);
}
view all matches for this distribution
view release on metacpan or search on metacpan
t/MyTestHelpers.pm view on Meta::CPAN
# uncomment this to run the ### lines
#use Smart::Comments;
@ISA = ('Exporter');
@EXPORT_OK = qw(findrefs
main_iterations
warn_suppress_gtk_icon
glib_gtk_versions
any_signal_connections
nowarnings);
%EXPORT_TAGS = (all => \@EXPORT_OK);
t/MyTestHelpers.pm view on Meta::CPAN
#-----------------------------------------------------------------------------
# Gtk/Glib helpers
# Gtk 2.16 can go into a hard loop on events_pending() / main_iteration_do()
# if dbus is not running, or something like that. In any case limiting the
# iterations is good for test safety.
#
sub main_iterations {
my $count = 0;
if (DEBUG) { MyTestHelpers::diag ("main_iterations() ..."); }
while (Gtk2->events_pending) {
$count++;
Gtk2->main_iteration_do (0);
if ($count >= 500) {
MyTestHelpers::diag ("main_iterations(): oops, bailed out after $count events/iterations");
return;
}
}
MyTestHelpers::diag ("main_iterations(): ran $count events/iterations");
}
# warn_suppress_gtk_icon() is a $SIG{__WARN__} handler which suppresses spam
# from Gtk trying to make you buy the hi-colour icon theme. Eg,
#
t/MyTestHelpers.pm view on Meta::CPAN
while (! $done) {
if (DEBUG >= 2) { MyTestHelpers::diag ("wait_for_event() iteration $count"); }
Gtk2->main_iteration;
$count++;
}
MyTestHelpers::diag ("wait_for_event(): '$signame' ran $count events/iterations\n");
$widget->signal_handler_disconnect ($sig_id);
Glib::Source->remove ($timer_id);
}
view all matches for this distribution
view release on metacpan or search on metacpan
t/MyTestHelpers.pm view on Meta::CPAN
# uncomment this to run the ### lines
#use Smart::Comments;
@ISA = ('Exporter');
@EXPORT_OK = qw(findrefs
main_iterations
warn_suppress_gtk_icon
glib_gtk_versions
any_signal_connections
nowarnings);
%EXPORT_TAGS = (all => \@EXPORT_OK);
t/MyTestHelpers.pm view on Meta::CPAN
#-----------------------------------------------------------------------------
# Gtk/Glib helpers
# Gtk 2.16 can go into a hard loop on events_pending() / main_iteration_do()
# if dbus is not running, or something like that. In any case limiting the
# iterations is good for test safety.
#
sub main_iterations {
my $count = 0;
if (DEBUG) { MyTestHelpers::diag ("main_iterations() ..."); }
while (Gtk2->events_pending) {
$count++;
Gtk2->main_iteration_do (0);
if ($count >= 500) {
MyTestHelpers::diag ("main_iterations(): oops, bailed out after $count events/iterations");
return;
}
}
MyTestHelpers::diag ("main_iterations(): ran $count events/iterations");
}
# warn_suppress_gtk_icon() is a $SIG{__WARN__} handler which suppresses spam
# from Gtk trying to make you buy the hi-colour icon theme. Eg,
#
t/MyTestHelpers.pm view on Meta::CPAN
while (! $done) {
if (DEBUG >= 2) { MyTestHelpers::diag ("wait_for_event() iteration $count"); }
Gtk2->main_iteration;
$count++;
}
MyTestHelpers::diag ("wait_for_event(): '$signame' ran $count events/iterations\n");
$widget->signal_handler_disconnect ($sig_id);
Glib::Source->remove ($timer_id);
}
view all matches for this distribution
view release on metacpan or search on metacpan
t/MyTestHelpers.pm view on Meta::CPAN
# uncomment this to run the ### lines
#use Smart::Comments;
@ISA = ('Exporter');
@EXPORT_OK = qw(findrefs
main_iterations
warn_suppress_gtk_icon
glib_gtk_versions
any_signal_connections
nowarnings);
%EXPORT_TAGS = (all => \@EXPORT_OK);
t/MyTestHelpers.pm view on Meta::CPAN
#-----------------------------------------------------------------------------
# Gtk/Glib helpers
# Gtk 2.16 can go into a hard loop on events_pending() / main_iteration_do()
# if dbus is not running, or something like that. In any case limiting the
# iterations is good for test safety.
#
sub main_iterations {
my $count = 0;
if (DEBUG) { MyTestHelpers::diag ("main_iterations() ..."); }
while (Gtk2->events_pending) {
$count++;
Gtk2->main_iteration_do (0);
if ($count >= 500) {
MyTestHelpers::diag ("main_iterations(): oops, bailed out after $count events/iterations");
return;
}
}
MyTestHelpers::diag ("main_iterations(): ran $count events/iterations");
}
# warn_suppress_gtk_icon() is a $SIG{__WARN__} handler which suppresses spam
# from Gtk trying to make you buy the hi-colour icon theme. Eg,
#
t/MyTestHelpers.pm view on Meta::CPAN
while (! $done) {
if (DEBUG >= 2) { MyTestHelpers::diag ("wait_for_event() iteration $count"); }
Gtk2->main_iteration;
$count++;
}
MyTestHelpers::diag ("wait_for_event(): '$signame' ran $count events/iterations\n");
$widget->signal_handler_disconnect ($sig_id);
Glib::Source->remove ($timer_id);
}
view all matches for this distribution
view release on metacpan or search on metacpan
t/MyTestHelpers.pm view on Meta::CPAN
#
# use Exporter;
# use vars qw(@ISA @EXPORT_OK %EXPORT_TAGS);
# @ISA = ('Exporter');
# @EXPORT_OK = qw(findrefs
# main_iterations
# warn_suppress_gtk_icon
# glib_gtk_versions
# any_signal_connections
# nowarnings);
# %EXPORT_TAGS = (all => \@EXPORT_OK);
t/MyTestHelpers.pm view on Meta::CPAN
#-----------------------------------------------------------------------------
# Gtk/Glib helpers
# Gtk 2.16 can go into a hard loop on events_pending() / main_iteration_do()
# if dbus is not running, or something like that. In any case limiting the
# iterations is good for test safety.
#
sub main_iterations {
my $count = 0;
if (DEBUG) { MyTestHelpers::diag ("main_iterations() ..."); }
while (Gtk2->events_pending) {
$count++;
Gtk2->main_iteration_do (0);
if ($count >= 500) {
MyTestHelpers::diag ("main_iterations(): oops, bailed out after $count events/iterations");
return;
}
}
MyTestHelpers::diag ("main_iterations(): ran $count events/iterations");
}
# warn_suppress_gtk_icon() is a $SIG{__WARN__} handler which suppresses spam
# from Gtk trying to make you buy the hi-colour icon theme. Eg,
#
t/MyTestHelpers.pm view on Meta::CPAN
while (! $done) {
if (DEBUG >= 2) { MyTestHelpers::diag ("wait_for_event() iteration $count"); }
Gtk2->main_iteration;
$count++;
}
MyTestHelpers::diag ("wait_for_event(): '$signame' ran $count events/iterations\n");
$widget->signal_handler_disconnect ($sig_id);
Glib::Source->remove ($timer_id);
}
view all matches for this distribution
view release on metacpan or search on metacpan
t/MyTestHelpers.pm view on Meta::CPAN
#
# use Exporter;
# use vars qw(@ISA @EXPORT_OK %EXPORT_TAGS);
# @ISA = ('Exporter');
# @EXPORT_OK = qw(findrefs
# main_iterations
# warn_suppress_gtk_icon
# glib_gtk_versions
# any_signal_connections
# nowarnings);
# %EXPORT_TAGS = (all => \@EXPORT_OK);
t/MyTestHelpers.pm view on Meta::CPAN
#-----------------------------------------------------------------------------
# Gtk/Glib helpers
# Gtk 2.16 can go into a hard loop on events_pending() / main_iteration_do()
# if dbus is not running, or something like that. In any case limiting the
# iterations is good for test safety.
#
sub main_iterations {
my $count = 0;
if (DEBUG) { MyTestHelpers::diag ("main_iterations() ..."); }
while (Gtk2->events_pending) {
$count++;
Gtk2->main_iteration_do (0);
if ($count >= 500) {
MyTestHelpers::diag ("main_iterations(): oops, bailed out after $count events/iterations");
return;
}
}
MyTestHelpers::diag ("main_iterations(): ran $count events/iterations");
}
# warn_suppress_gtk_icon() is a $SIG{__WARN__} handler which suppresses spam
# from Gtk trying to make you buy the hi-colour icon theme. Eg,
#
t/MyTestHelpers.pm view on Meta::CPAN
while (! $done) {
if (DEBUG >= 2) { MyTestHelpers::diag ("wait_for_event() iteration $count"); }
Gtk2->main_iteration;
$count++;
}
MyTestHelpers::diag ("wait_for_event(): '$signame' ran $count events/iterations\n");
$widget->signal_handler_disconnect ($sig_id);
Glib::Source->remove ($timer_id);
}
view all matches for this distribution
view release on metacpan or search on metacpan
t/MyTestHelpers.pm view on Meta::CPAN
use Exporter;
use vars qw(@ISA @EXPORT_OK %EXPORT_TAGS);
@ISA = ('Exporter');
@EXPORT_OK = qw(findrefs
main_iterations
warn_suppress_gtk_icon
glib_gtk_versions
any_signal_connections
nowarnings);
%EXPORT_TAGS = (all => \@EXPORT_OK);
t/MyTestHelpers.pm view on Meta::CPAN
#-----------------------------------------------------------------------------
# Gtk/Glib helpers
# Gtk 2.16 can go into a hard loop on events_pending() / main_iteration_do()
# if dbus is not running, or something like that. In any case limiting the
# iterations is good for test safety.
#
sub main_iterations {
require Test::More;
my $count = 0;
if (DEBUG) { Test::More::diag ("main_iterations() ..."); }
while (Gtk2->events_pending) {
$count++;
Gtk2->main_iteration_do (0);
if ($count >= 500) {
Test::More::diag ("main_iterations(): oops, bailed out after $count events/iterations");
return;
}
}
Test::More::diag ("main_iterations(): ran $count events/iterations");
}
# warn_suppress_gtk_icon() is a $SIG{__WARN__} handler which suppresses spam
# from Gtk trying to make you buy the hi-colour icon theme. Eg,
#
t/MyTestHelpers.pm view on Meta::CPAN
while (! $done) {
if (DEBUG >= 2) { Test::More::diag ("wait_for_event() iteration $count"); }
Gtk2->main_iteration;
$count++;
}
Test::More::diag ("wait_for_event(): '$signame' ran $count events/iterations\n");
$widget->signal_handler_disconnect ($sig_id);
Glib::Source->remove ($timer_id);
}
view all matches for this distribution
view release on metacpan or search on metacpan
t/MyTestHelpers.pm view on Meta::CPAN
#
# use Exporter;
# use vars qw(@ISA @EXPORT_OK %EXPORT_TAGS);
# @ISA = ('Exporter');
# @EXPORT_OK = qw(findrefs
# main_iterations
# warn_suppress_gtk_icon
# glib_gtk_versions
# any_signal_connections
# nowarnings);
# %EXPORT_TAGS = (all => \@EXPORT_OK);
t/MyTestHelpers.pm view on Meta::CPAN
#-----------------------------------------------------------------------------
# Gtk/Glib helpers
# Gtk 2.16 can go into a hard loop on events_pending() / main_iteration_do()
# if dbus is not running, or something like that. In any case limiting the
# iterations is good for test safety.
#
sub main_iterations {
my $count = 0;
if (DEBUG) { MyTestHelpers::diag ("main_iterations() ..."); }
while (Gtk2->events_pending) {
$count++;
Gtk2->main_iteration_do (0);
if ($count >= 500) {
MyTestHelpers::diag ("main_iterations(): oops, bailed out after $count events/iterations");
return;
}
}
MyTestHelpers::diag ("main_iterations(): ran $count events/iterations");
}
# warn_suppress_gtk_icon() is a $SIG{__WARN__} handler which suppresses spam
# from Gtk trying to make you buy the hi-colour icon theme. Eg,
#
t/MyTestHelpers.pm view on Meta::CPAN
while (! $done) {
if (DEBUG >= 2) { MyTestHelpers::diag ("wait_for_event() iteration $count"); }
Gtk2->main_iteration;
$count++;
}
MyTestHelpers::diag ("wait_for_event(): '$signame' ran $count events/iterations\n");
$widget->signal_handler_disconnect ($sig_id);
Glib::Source->remove ($timer_id);
}
view all matches for this distribution
view release on metacpan or search on metacpan
t/MyTestHelpers.pm view on Meta::CPAN
# uncomment this to run the ### lines
#use Smart::Comments;
@ISA = ('Exporter');
@EXPORT_OK = qw(findrefs
main_iterations
warn_suppress_gtk_icon
glib_gtk_versions
any_signal_connections
nowarnings);
%EXPORT_TAGS = (all => \@EXPORT_OK);
t/MyTestHelpers.pm view on Meta::CPAN
#-----------------------------------------------------------------------------
# Gtk/Glib helpers
# Gtk 2.16 can go into a hard loop on events_pending() / main_iteration_do()
# if dbus is not running, or something like that. In any case limiting the
# iterations is good for test safety.
#
sub main_iterations {
my $count = 0;
if (DEBUG) { MyTestHelpers::diag ("main_iterations() ..."); }
while (Gtk2->events_pending) {
$count++;
Gtk2->main_iteration_do (0);
if ($count >= 500) {
MyTestHelpers::diag ("main_iterations(): oops, bailed out after $count events/iterations");
return;
}
}
MyTestHelpers::diag ("main_iterations(): ran $count events/iterations");
}
# warn_suppress_gtk_icon() is a $SIG{__WARN__} handler which suppresses spam
# from Gtk trying to make you buy the hi-colour icon theme. Eg,
#
t/MyTestHelpers.pm view on Meta::CPAN
while (! $done) {
if (DEBUG >= 2) { MyTestHelpers::diag ("wait_for_event() iteration $count"); }
Gtk2->main_iteration;
$count++;
}
MyTestHelpers::diag ("wait_for_event(): '$signame' ran $count events/iterations\n");
$widget->signal_handler_disconnect ($sig_id);
Glib::Source->remove ($timer_id);
}
view all matches for this distribution
view release on metacpan or search on metacpan
t/02_CellRenderer.t view on Meta::CPAN
diag ("Running on Gtk version ",
Gtk2::major_version(), ".",
Gtk2::minor_version(), ".",
Gtk2::micro_version(), ".");
sub main_iterations {
my $count = 0;
while (Gtk2->events_pending) {
$count++;
Gtk2->main_iteration_do (0);
}
diag "main_iterations(): ran $count events/iterations\n";
}
#-----------------------------------------------------------------------------
# plain creation
t/02_CellRenderer.t view on Meta::CPAN
($event, $toplevel, "0", $rect, $rect, ['selected']);
isa_ok ($editable, 'Gtk2::CellEditable',
'start_editing return');
$toplevel->add ($editable);
$toplevel->remove ($editable);
main_iterations (); # for idle handler hack
require Scalar::Util;
Scalar::Util::weaken ($editable);
is ($editable, undef, 'editable should be garbage collected when weakened');
view all matches for this distribution
view release on metacpan or search on metacpan
t/MyTestHelpers.pm view on Meta::CPAN
#
# use Exporter;
# use vars qw(@ISA @EXPORT_OK %EXPORT_TAGS);
# @ISA = ('Exporter');
# @EXPORT_OK = qw(findrefs
# main_iterations
# warn_suppress_gtk_icon
# glib_gtk_versions
# any_signal_connections
# nowarnings);
# %EXPORT_TAGS = (all => \@EXPORT_OK);
t/MyTestHelpers.pm view on Meta::CPAN
#-----------------------------------------------------------------------------
# Gtk/Glib helpers
# Gtk 2.16 can go into a hard loop on events_pending() / main_iteration_do()
# if dbus is not running, or something like that. In any case limiting the
# iterations is good for test safety.
#
sub main_iterations {
my $count = 0;
if (DEBUG) { MyTestHelpers::diag ("main_iterations() ..."); }
while (Gtk2->events_pending) {
$count++;
Gtk2->main_iteration_do (0);
if ($count >= 500) {
MyTestHelpers::diag ("main_iterations(): oops, bailed out after $count events/iterations");
return;
}
}
MyTestHelpers::diag ("main_iterations(): ran $count events/iterations");
}
# warn_suppress_gtk_icon() is a $SIG{__WARN__} handler which suppresses spam
# from Gtk trying to make you buy the hi-colour icon theme. Eg,
#
t/MyTestHelpers.pm view on Meta::CPAN
while (! $done) {
if (DEBUG >= 2) { MyTestHelpers::diag ("wait_for_event() iteration $count"); }
Gtk2->main_iteration;
$count++;
}
MyTestHelpers::diag ("wait_for_event(): '$signame' ran $count events/iterations\n");
$widget->signal_handler_disconnect ($sig_id);
Glib::Source->remove ($timer_id);
}
view all matches for this distribution
view release on metacpan or search on metacpan
t/MyTestHelpers.pm view on Meta::CPAN
#
# use Exporter;
# use vars qw(@ISA @EXPORT_OK %EXPORT_TAGS);
# @ISA = ('Exporter');
# @EXPORT_OK = qw(findrefs
# main_iterations
# warn_suppress_gtk_icon
# glib_gtk_versions
# any_signal_connections
# nowarnings);
# %EXPORT_TAGS = (all => \@EXPORT_OK);
t/MyTestHelpers.pm view on Meta::CPAN
#-----------------------------------------------------------------------------
# Gtk/Glib helpers
# Gtk 2.16 can go into a hard loop on events_pending() / main_iteration_do()
# if dbus is not running, or something like that. In any case limiting the
# iterations is good for test safety.
#
sub main_iterations {
my $count = 0;
if (DEBUG) { MyTestHelpers::diag ("main_iterations() ..."); }
while (Gtk2->events_pending) {
$count++;
Gtk2->main_iteration_do (0);
if ($count >= 500) {
MyTestHelpers::diag ("main_iterations(): oops, bailed out after $count events/iterations");
return;
}
}
MyTestHelpers::diag ("main_iterations(): ran $count events/iterations");
}
# warn_suppress_gtk_icon() is a $SIG{__WARN__} handler which suppresses spam
# from Gtk trying to make you buy the hi-colour icon theme. Eg,
#
t/MyTestHelpers.pm view on Meta::CPAN
while (! $done) {
if (DEBUG >= 2) { MyTestHelpers::diag ("wait_for_event() iteration $count"); }
Gtk2->main_iteration;
$count++;
}
MyTestHelpers::diag ("wait_for_event(): '$signame' ran $count events/iterations\n");
$widget->signal_handler_disconnect ($sig_id);
Glib::Source->remove ($timer_id);
}
view all matches for this distribution
view release on metacpan or search on metacpan
t/MyTestHelpers.pm view on Meta::CPAN
use Exporter;
use vars qw(@ISA @EXPORT_OK %EXPORT_TAGS);
@ISA = ('Exporter');
@EXPORT_OK = qw(findrefs
main_iterations
warn_suppress_gtk_icon
glib_gtk_versions
any_signal_connections
nowarnings);
%EXPORT_TAGS = (all => \@EXPORT_OK);
t/MyTestHelpers.pm view on Meta::CPAN
#-----------------------------------------------------------------------------
# Gtk/Glib helpers
# Gtk 2.16 can go into a hard loop on events_pending() / main_iteration_do()
# if dbus is not running, or something like that. In any case limiting the
# iterations is good for test safety.
#
sub main_iterations {
require Test::More;
my $count = 0;
if (DEBUG) { Test::More::diag ("main_iterations() ..."); }
while (Gtk2->events_pending) {
$count++;
Gtk2->main_iteration_do (0);
if ($count >= 500) {
Test::More::diag ("main_iterations(): oops, bailed out after $count events/iterations");
return;
}
}
Test::More::diag ("main_iterations(): ran $count events/iterations");
}
# warn_suppress_gtk_icon() is a $SIG{__WARN__} handler which suppresses spam
# from Gtk trying to make you buy the hi-colour icon theme. Eg,
#
t/MyTestHelpers.pm view on Meta::CPAN
while (! $done) {
if (DEBUG >= 2) { Test::More::diag ("wait_for_event() iteration $count"); }
Gtk2->main_iteration;
$count++;
}
Test::More::diag ("wait_for_event(): '$signame' ran $count events/iterations\n");
$widget->signal_handler_disconnect ($sig_id);
Glib::Source->remove ($timer_id);
}
view all matches for this distribution
view release on metacpan or search on metacpan
t/MyTestHelpers.pm view on Meta::CPAN
use Exporter;
use vars qw(@ISA @EXPORT_OK %EXPORT_TAGS);
@ISA = ('Exporter');
@EXPORT_OK = qw(findrefs
main_iterations
warn_suppress_gtk_icon
glib_gtk_versions
any_signal_connections
nowarnings);
%EXPORT_TAGS = (all => \@EXPORT_OK);
t/MyTestHelpers.pm view on Meta::CPAN
#-----------------------------------------------------------------------------
# Gtk/Glib helpers
# Gtk 2.16 can go into a hard loop on events_pending() / main_iteration_do()
# if dbus is not running, or something like that. In any case limiting the
# iterations is good for test safety.
#
sub main_iterations {
require Test::More;
my $count = 0;
if (DEBUG) { Test::More::diag ("main_iterations() ..."); }
while (Gtk2->events_pending) {
$count++;
Gtk2->main_iteration_do (0);
if ($count >= 500) {
Test::More::diag ("main_iterations(): oops, bailed out after $count events/iterations");
return;
}
}
Test::More::diag ("main_iterations(): ran $count events/iterations");
}
# warn_suppress_gtk_icon() is a $SIG{__WARN__} handler which suppresses spam
# from Gtk trying to make you buy the hi-colour icon theme. Eg,
#
t/MyTestHelpers.pm view on Meta::CPAN
while (! $done) {
if (DEBUG >= 2) { Test::More::diag ("wait_for_event() iteration $count"); }
Gtk2->main_iteration;
$count++;
}
Test::More::diag ("wait_for_event(): '$signame' ran $count events/iterations\n");
$widget->signal_handler_disconnect ($sig_id);
Glib::Source->remove ($timer_id);
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Test/Weaken/Gtk2.pm view on Meta::CPAN
}
sub destructor_destroy_and_iterate {
my ($ref) = @_;
destructor_destroy ($ref);
_main_iterations();
}
# Gtk 2.16 can go into a hard loop on events_pending() / main_iteration_do()
# if dbus is not running, or something like that. In any case limiting the
# iterations is good for test safety.
#
# FIXME: Not sure how aggressive to be on hitting the maximum count. If
# testing can likely continue then a diagnostic is enough, but maybe a
# count-out means something too broken to continue.
#
# The iterations count actually run is cute to see to check what has gone
# through the main loop. Would it be worth giving that always, or under an
# option, or something?
#
sub _main_iterations {
require Test::More;
my $count = 0;
### _main_iterations() ...
while (Gtk2->events_pending) {
$count++;
Gtk2->main_iteration_do (0);
if ($count >= 1000) {
### _main_iterations() count exceeded: $count
eval {
Test::More::diag ("main_iterations(): oops, bailed out after $count events/iterations");
};
return;
}
}
### _main_iterations() events/iterations: $count
}
#------------------------------------------------------------------------------
sub ignore_default_display {
my ($ref) = @_;
lib/Test/Weaken/Gtk2.pm view on Meta::CPAN
=item C<< Test::Weaken::Gtk2::destructor_destroy_and_iterate ($top) >>
The same as C<destructor_destroy()> above, but in addition run
C<< Gtk2->main_iteration_do() >> for queued main loop actions. There's a
limit on the number of iterations done, so as to protect against a runaway
main loop.
This is good if some finalizations are only done in an idle handler, or
perhaps under a timer which has now expired. Currently queued events from
the X server are run, but there's no read or wait for further events.
view all matches for this distribution
view release on metacpan or search on metacpan
t/MyTestHelpers.pm view on Meta::CPAN
#
# use Exporter;
# use vars qw(@ISA @EXPORT_OK %EXPORT_TAGS);
# @ISA = ('Exporter');
# @EXPORT_OK = qw(findrefs
# main_iterations
# warn_suppress_gtk_icon
# glib_gtk_versions
# any_signal_connections
# nowarnings);
# %EXPORT_TAGS = (all => \@EXPORT_OK);
t/MyTestHelpers.pm view on Meta::CPAN
#-----------------------------------------------------------------------------
# Gtk/Glib helpers
# Gtk 2.16 can go into a hard loop on events_pending() / main_iteration_do()
# if dbus is not running, or something like that. In any case limiting the
# iterations is good for test safety.
#
sub main_iterations {
my $count = 0;
if (DEBUG) { MyTestHelpers::diag ("main_iterations() ..."); }
while (Gtk2->events_pending) {
$count++;
Gtk2->main_iteration_do (0);
if ($count >= 500) {
MyTestHelpers::diag ("main_iterations(): oops, bailed out after $count events/iterations");
return;
}
}
MyTestHelpers::diag ("main_iterations(): ran $count events/iterations");
}
# warn_suppress_gtk_icon() is a $SIG{__WARN__} handler which suppresses spam
# from Gtk trying to make you buy the hi-colour icon theme. Eg,
#
t/MyTestHelpers.pm view on Meta::CPAN
while (! $done) {
if (DEBUG >= 2) { MyTestHelpers::diag ("wait_for_event() iteration $count"); }
Gtk2->main_iteration;
$count++;
}
MyTestHelpers::diag ("wait_for_event(): '$signame' ran $count events/iterations\n");
$widget->signal_handler_disconnect ($sig_id);
Glib::Source->remove ($timer_id);
}
view all matches for this distribution
view release on metacpan or search on metacpan
devel/cross-ids.pl view on Meta::CPAN
'weaken active - initially no CrossHair data');
$cross->start;
diag explain $cross;
# sync and iterate to make the cross draw and use its gc
$display->sync;
MyTestHelpers::main_iterations();
is_deeply (leftover_fields($widget), [],
'weaken active - initially no CrossHair data');
my $weak_cross = $cross;
Scalar::Util::weaken ($weak_cross);
$cross = undef;
MyTestHelpers::main_iterations();
is ($weak_cross, undef, 'weaken active - destroyed');
is_deeply (leftover_fields($widget), [],
'weaken active - no CrossHair data left behind');
$widget->destroy;
view all matches for this distribution
view release on metacpan or search on metacpan
example/performance.pl view on Meta::CPAN
#!/usr/bin/perl -w
# usage: $0 <want_time> <number_of_buckets=100> <number_of_iterations=10000>
use strict;
use YAML;
use Guard::Stats;
view all matches for this distribution
view release on metacpan or search on metacpan
gzip-zopfli-perl.c view on Meta::CPAN
gz->no_warn = 0;
}
return;
}
if (CMP(key, numiterations)) {
int n;
if (! SvIOK (value)) {
warn ("numiterations requires a number");
}
n = SvIV (value);
// Check values
gz->options.numiterations = n;
return;
}
if (CMP (key, blocksplitting)) {
gz->options.blocksplitting = SvTRUE (value);
return;
view all matches for this distribution
view release on metacpan or search on metacpan
Template.pm view on Meta::CPAN
<a href="http://www.google.com">Google</a>
Following preprocessors are effective for C<foreach>.
C<foreach:sep=SEP> proprocessor specifies separator between outputs of
iterations.
For example,
<{ foreach num foreach:sep=' | '}>
<* iter *>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/HP/Handy.pm view on Meta::CPAN
loop.revindex reverse counter (1-based)
loop.revindex0 reverse counter (0-based)
loop.first true on first iteration
loop.last true on last iteration
loop.length total number of items
loop.odd true on odd iterations
loop.even true on even iterations
Dict iteration:
{% for key, value in mapping %}
{{ key }}: {{ value }}
view all matches for this distribution
view release on metacpan or search on metacpan
t/01.progression.t view on Meta::CPAN
my $t_acid = HTML::Acid->new;
my $t_actual = $t_acid->burn($input);
croak "failed" if $t_actual ne $expected;
});
ok($benchmark->iters > $MINIMUM_ITERS*$REFERENCE_SIZE/$size,
"minimal iterations - $basename");
}
else {
pass('set TEST_AUTHOR=1 for timings');
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
Also, this is done so that round trip ( read and then write back out ) behavior
is consistent.
=item * Nodes named value
Previously iterations of this module had problems with nodes named 'value',
due to the fact that node contents are stored under the 'value' key already.
The current version should parse such files without any problem, although it
may be confusing to see a parsed tree with 'value' pointing to another hash
containing 'value' as well.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/HTML/Bricks/Magick.pm view on Meta::CPAN
our $VERSION = '0.02';
my %LegalArguments = map { $_ => 1 }
qw (adjoin background bordercolor colormap colorspace
colors compress density dispose delay dither
display font format iterations interlace
loop magick mattecolor monochrome page pointsize
preview_type quality scene subimage subrange
size tile texture treedepth undercolor);
my %LegalFilters = map { $_ => 1 }
view all matches for this distribution
view release on metacpan or search on metacpan
require 't/lib.pl';
use strict;
use vars qw($iterations);
BEGIN {
# Suppress warnings -- we do some setting of variables without using them
$^W = 0;
$HTML::CMTemplate::DEBUG=1;
print "1..1\n";
print (test() ? "ok 1\n" : "not ok 1\n");
}
sub test {
$iterations = 0;
my $t = new HTML::CMTemplate();
$t->import_template(
filename => 't/while.ctpl',
return compare_str_to_file( T_while::output(), 't/while.real' );
}
sub next {
return ($iterations++ < 10);
}
view all matches for this distribution