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


Getopt-Alt

 view release on metacpan or  search on metacpan

t/options-valid.t  view on Meta::CPAN

        , 'interactice|i'
        , 'i=s%'
        , 'itterations|i=i'
        , 'join|j'
        , 'j=s%'
        , 'keepalive|k'
        , 'kill|k'
        , 'kilobyte|k'
        , 'k=s%'
        , 'length|l=i'
        , 'level|l=i'

 view all matches for this distribution


Getopt-Compact-WithCmd

 view release on metacpan or  search on metacpan

t/03_opts.t  view on Meta::CPAN


use Getopt::Compact::WithCmd;

sub test_opts {
    my %specs = @_;
    my ($args, $expects, $desc, $argv, $is_alive, $extra_test)
        = @specs{qw/args expects desc argv is_alive extra_test/};

    subtest $desc => sub {
        @::ARGV = @$argv if $argv;
        my $go = new_ok 'Getopt::Compact::WithCmd', [%$args];

        if ($is_alive) {
            is_deeply +$go->opts, $expects, 'opts';
        }
        else {
            ok stdout_from(sub{ $go->opts }), 'show usage';
        }

t/03_opts.t  view on Meta::CPAN

test_opts(
    args => {},
    expects => {
        help => undef,
    },
    is_alive => 1,
    desc => 'empty params',
);

test_opts(
    args => {
        global_struct => [],
    },
    expects => {
        help => undef,
    },
    is_alive => 1,
    desc => 'with empty global_struct',
);

test_opts(
    args => {

t/03_opts.t  view on Meta::CPAN

    },
    expects => {
        foo  => undef,
        help => undef,
    },
    is_alive => 1,
    desc => 'with global_struct (foo)',
);

test_opts(
    args => {

t/03_opts.t  view on Meta::CPAN

    },
    expects => {
        foo  => 1,
        help => undef,
    },
    is_alive => 1,
    argv => [qw/--foo/],
    desc => 'with global_struct (foo) / ARGV=--foo',
);

{

t/03_opts.t  view on Meta::CPAN

            ],
        },
        expects => {
            help => undef,
        },
        is_alive => 1,
        argv => [qw/--foo/],
        desc => 'with global_struct (dest foo)',
    );
}

t/03_opts.t  view on Meta::CPAN

            ],
        },
        expects => {
            help => undef,
        },
        is_alive => 1,
        argv => [qw/--foo/],
        extra_test => sub {
            is $foo, 1, 'dest foo';
        },
        desc => 'with global_struct (dest foo)',

t/03_opts.t  view on Meta::CPAN

            ],
        },
        expects => {
            help => undef,
        },
        is_alive => 1,
        argv => [qw/--foo/],
        extra_test => sub {
            is $foo, 1, 'dest foo';
        },
        desc => 'with global_struct (dest foo)',

t/03_opts.t  view on Meta::CPAN

    args => {
        global_struct => [
            [ [qw/f foo/], 'foo', '!' ],
        ],
    },
    is_alive => 0,
    argv => [qw/--hoge/],
    desc => 'with global_struct (foo) / Unknown option',
);

test_opts(
    args => {
        global_struct => [
            [ [qw/f foo/], 'foo', '!' ],
        ],
    },
    is_alive => 0,
    argv => [qw/--help/],
    desc => 'with global_struct (foo) / ARGV=--help',
);

test_opts(

t/03_opts.t  view on Meta::CPAN

    },
    expects => {
        foo  => undef,
        help => undef,
    },
    is_alive => 1,
    desc => 'with global_struct (foo) / command_struct (bar) / empty ARGV',
);

test_opts(
    args => {

t/03_opts.t  view on Meta::CPAN

        foo  => undef,
        bar  => undef,
        help => undef,
    },
    argv => [qw/hoge/],
    is_alive => 1,
    desc => 'with global_struct (foo) / command_struct (bar) / ARGV=hoge',
);

test_opts(
    args => {

t/03_opts.t  view on Meta::CPAN

        foo  => undef,
        bar  => 1,
        help => undef,
    },
    argv => [qw/hoge --bar/],
    is_alive => 1,
    desc => 'with global_struct (foo) / command_struct (bar) / ARGV=hoge --bar',
);

test_opts(
    args => {

t/03_opts.t  view on Meta::CPAN

        foo  => 1,
        bar  => 1,
        help => undef,
    },
    argv => [qw/--foo hoge --bar/],
    is_alive => 1,
    desc => 'with global_struct (foo) / command_struct (bar) / ARGV=--foo hoge --bar',
);

{
    my $bar;

t/03_opts.t  view on Meta::CPAN

        expects => {
            foo  => 1,
            help => undef,
        },
        argv => [qw/--foo hoge --bar/],
        is_alive => 1,
        extra_test => sub {
            is $bar, 1, 'dest bar';
        },
        desc => 'with global_struct (foo) / command_struct (dest bar) / ARGV=--foo hoge --bar',
    );

t/03_opts.t  view on Meta::CPAN

                ]
            },
        }
    },
    argv => [qw/hoge --help/],
    is_alive => 0,
    desc => 'with global_struct (foo) / command_struct (bar) / ARGV=hoge --help',
);

test_opts(
    args => {

t/03_opts.t  view on Meta::CPAN

                ]
            },
        }
    },
    argv => [qw/help/],
    is_alive => 0,
    desc => 'with global_struct (foo) / command_struct (bar) / ARGV=help',
);

test_opts(
    args => {

t/03_opts.t  view on Meta::CPAN

                ]
            },
        }
    },
    argv => [qw/help hoge/],
    is_alive => 0,
    desc => 'with global_struct (foo) / command_struct (bar) / ARGV=help hoge',
);

test_opts(
    args => {

t/03_opts.t  view on Meta::CPAN

                type  => '!',
            },
        },
    },
    argv => [],
    is_alive => 1,
    expects => {
        help => undef,
        foo  => undef,
    },
    desc => 'HASH element',

t/03_opts.t  view on Meta::CPAN

                type  => '!',
            },
        },
    },
    argv => [qw/-f/],
    is_alive => 1,
    expects => {
        help => undef,
        foo  => 1,
    },
    desc => 'alias of SCALAR',

t/03_opts.t  view on Meta::CPAN

                },
            },
        },
    },
    argv => [qw/hoge --bar/],
    is_alive => 1,
    expects => {
        help => undef,
        foo  => undef,
        bar  => 1,
    },

 view all matches for this distribution


Git-Background

 view release on metacpan or  search on metacpan

lib/Git/Background/Future.pm  view on Meta::CPAN


sub _await_if_git_is_done {
    my ($self) = @_;

    my $run = $self->udata('_run');
    if ( defined $run && !$run->{_proc}->alive ) {
        $self->await;
    }

    return;
}

 view all matches for this distribution


Git-Raw

 view release on metacpan or  search on metacpan

deps/libgit2/deps/http-parser/http_parser.c  view on Meta::CPAN

#define CONNECTION "connection"
#define CONTENT_LENGTH "content-length"
#define TRANSFER_ENCODING "transfer-encoding"
#define UPGRADE "upgrade"
#define CHUNKED "chunked"
#define KEEP_ALIVE "keep-alive"
#define CLOSE "close"


static const char *method_strings[] =
  {

deps/libgit2/deps/http-parser/http_parser.c  view on Meta::CPAN

  , h_content_length
  , h_transfer_encoding
  , h_upgrade

  , h_matching_transfer_encoding_chunked
  , h_matching_connection_keep_alive
  , h_matching_connection_close

  , h_transfer_encoding_chunked
  , h_connection_keep_alive
  , h_connection_close
  };

enum http_host_state
  {

deps/libgit2/deps/http-parser/http_parser.c  view on Meta::CPAN

  if (cond) {                                                        \
    SET_ERRNO(HPE_STRICT);                                           \
    goto error;                                                      \
  }                                                                  \
} while (0)
# define NEW_MESSAGE() (http_should_keep_alive(parser) ? start_state : s_dead)
#else
# define STRICT_CHECK(cond)
# define NEW_MESSAGE() start_state
#endif

deps/libgit2/deps/http-parser/http_parser.c  view on Meta::CPAN


            parser->content_length = ch - '0';
            break;

          case h_connection:
            /* looking for 'Connection: keep-alive' */
            if (c == 'k') {
              parser->header_state = h_matching_connection_keep_alive;
            /* looking for 'Connection: close' */
            } else if (c == 'c') {
              parser->header_state = h_matching_connection_close;
            } else {
              parser->header_state = h_general;

deps/libgit2/deps/http-parser/http_parser.c  view on Meta::CPAN

            } else if (parser->index == sizeof(CHUNKED)-2) {
              parser->header_state = h_transfer_encoding_chunked;
            }
            break;

          /* looking for 'Connection: keep-alive' */
          case h_matching_connection_keep_alive:
            parser->index++;
            if (parser->index > sizeof(KEEP_ALIVE)-1
                || c != KEEP_ALIVE[parser->index]) {
              parser->header_state = h_general;
            } else if (parser->index == sizeof(KEEP_ALIVE)-2) {
              parser->header_state = h_connection_keep_alive;
            }
            break;

          /* looking for 'Connection: close' */
          case h_matching_connection_close:

deps/libgit2/deps/http-parser/http_parser.c  view on Meta::CPAN

              parser->header_state = h_connection_close;
            }
            break;

          case h_transfer_encoding_chunked:
          case h_connection_keep_alive:
          case h_connection_close:
            if (ch != ' ') parser->header_state = h_general;
            break;

          default:

deps/libgit2/deps/http-parser/http_parser.c  view on Meta::CPAN

        STRICT_CHECK(ch != LF);

        parser->state = s_header_value_lws;

        switch (parser->header_state) {
          case h_connection_keep_alive:
            parser->flags |= F_CONNECTION_KEEP_ALIVE;
            break;
          case h_connection_close:
            parser->flags |= F_CONNECTION_CLOSE;
            break;

deps/libgit2/deps/http-parser/http_parser.c  view on Meta::CPAN

  return 1;
}


int
http_should_keep_alive (const http_parser *parser)
{
  if (parser->http_major > 0 && parser->http_minor > 0) {
    /* HTTP/1.1 */
    if (parser->flags & F_CONNECTION_CLOSE) {
      return 0;

 view all matches for this distribution


Gitalist

 view release on metacpan or  search on metacpan

script/gitalist_server.pl  view on Meta::CPAN

   -f -fork           handle each request in a new process
                      (defaults to false)
   -? -help           display this help and exits
      -host           host (defaults to all)
   -p -port           port (defaults to 3000)
   -k -keepalive      enable keep-alive connections
   -r -restart        restart when files get modified
                      (defaults to false)
   -rd -restartdelay  delay between file checks
                      (ignored if you have Linux::Inotify2 installed)
   -rr -restartregex  regex match files that trigger

 view all matches for this distribution


Glib-Ex-ConnectProperties

 view release on metacpan or  search on metacpan

lib/Glib/Ex/ConnectProperties.pm  view on Meta::CPAN


# Hard/weak refs are as follows.
#
# * Readable property in new() permanent linkage -- the $object signal
#   connection has a hard ref to $elem, and $elem->{'self'} has a hard ref
#   to $self, so $elem is kept alive while $object lives.  The entry for
#   $elem within connp $self->{'array'} is weak so that $elem goes away when
#   $object is destroyed.
#
# * Readable property in dynamic() linkage -- $elem->{'self'} is weak, which
#   means $self can be garbage collected.  Each $elem is still kept alive by
#   the signal connection, but $self->DESTROY drops those connections.
#
# * Write-only property -- there's no signal connection, and $self has a
#   hard ref to $elem, with nothing from $elem back to $self.  The
#   write-onlys don't keep $self alive, only the readables.  Once the last
#   readable object is destroyed the $self and write-onlys are destroyed.
#
# In all cases $elem->{'object'} is only a weak ref to the target $object so
# a ConnectProperties never keeps a target object alive.
#
# When $self->{'array'} gets down to just one element (one readable one)
# it'd be possible to discard it as there's nowhere for its "notify" to
# propagate values to.  But maybe an add() could be made to extend an
# existing linkage, in which case would still want that last element.  Maybe

lib/Glib/Ex/ConnectProperties.pm  view on Meta::CPAN


    # value_validate() to clamp $to_val for $to_pspec
    # value_validate() is wrapped in Glib 1.220, remove the check when ready
    # to demand that version
    # In 1.240 may have to keep a new non ref counted boxed return from
    # func_in() alive if value_validate() makes an alias, hence
    # $to_val_keepalive.
    #
    my $to_val_keepalive = $to_val;
    (undef, $to_val) = $to_pspec->$value_validate_method($to_val);

    # skip if target already contains $to_val, to avoid extra 'notify's
    if ($to_flags & 'readable') {
      if (_pspec_equal ($to_pspec, $to_elem->get_value, $to_val)) {

 view all matches for this distribution


Glib-Ex-ObjectBits

 view release on metacpan or  search on metacpan

lib/Glib/Ex/FreezeNotify.pm  view on Meta::CPAN


FreezeNotify works by having C<thaw_notify()> in the destroy code of the
FreezeNotify object.

FreezeNotify only holds weak references to its objects, so the mere fact
they're due for later thawing doesn't keep them alive if nothing else cares
whether they live or die.  The effect is that frozen objects can be garbage
collected within a freeze block at the same point they would be without any
freezing, instead of extending their life to the end of the block.

It works to have multiple freeze/thaws, done either with FreezeNotify or

 view all matches for this distribution


Glib-Object-Introspection

 view release on metacpan or  search on metacpan

lib/Glib/Object/Introspection.pm  view on Meta::CPAN


=head2 Memory Handling

The functions for ref'ing and unref'ing objects and free'ing boxed structures
are not even mapped to Perl, because it's all handled automagically by the
bindings.  Objects will be kept alive so long as you have a Perl scalar
pointing to it or the object is referenced in another way, e.g. from a
container.

The only thing you have to be careful about is the lifespan of non
reference counted structures, which means most things derived from

 view all matches for this distribution


Glib

 view release on metacpan or  search on metacpan

ChangeLog.pre-git  view on Meta::CPAN

	retrieve the GPerlValueWrapperClass that corresponds to a given
	GType.

	* GBoxed.xs, GType.xs: Document that gperl_register_boxed() and
	gperl_register_fundamental_full() assume that the wrapper class is
	statically allocated and that it will always be alive.

2005/03/07	kaffeetisch

	* Glib.pm, Makefile.PL, META.yml, NEWS, README: Stable release
	1.080.

ChangeLog.pre-git  view on Meta::CPAN

	subclasses, and some tests for it
	* Glib.pm: pod updates
        * GObject.xs: big change in how perl wrappers are implemented.
	the new implementation will only ever create one perl wrapper (a
	real hash, with magic containing the gobject's address) for any
	gobject. The combined perl+gobject will stay alive as long as one
	of the partners is alive. The only real changes are in
	gperl_new_object and in the DESTROY method.
        * GType.xs: rename INSTANCE_INIT to INIT_INSTANCE and make it a
        function call as opposed to a method call. Also call FINALIZE_INSTANCE
        on object finalization time.  implemented creation of properties
	for an object in Glib::Type::register, and implemented calling

 view all matches for this distribution


Gnome2-Dia

 view release on metacpan or  search on metacpan

xs/DiaCanvasItem.xs  view on Meta::CPAN

	if (!g_type_is_a (type, DIA_TYPE_CANVAS_ITEM))
		croak ("%s(%s) is not a DiaCanvasItem",
		       package, g_type_name (type));

	/* peek should suffice, as the bindings should keep this class
	 * alive for us. */
	class = g_type_class_peek (type);

	if (!class)
		croak ("internal problem: can't peek at type class for %s(%d)",
		       g_type_name (type), type);

 view all matches for this distribution


GoferTransport-http

 view release on metacpan or  search on metacpan

lib/DBD/Gofer/Transport/http.pm  view on Meta::CPAN

            $request;
        };
        my $http_ua = $self->{http_ua} ||= do {
            my $useragent = LWP::UserAgent->new(
                timeout => $self->go_timeout,   # undef by default
                keep_alive => $CONN_CACHE, # sets total_capacity of LWP::ConnCache
                env_proxy => 1, # XXX
            );
            $useragent->agent(join "/", __PACKAGE__, $DBI::VERSION, $VERSION);
            #$useragent->credentials( $netloc, $realm, $uname, $pass ); XXX
            $useragent->parse_head(0); # don't parse html head

 view all matches for this distribution


Goo

 view release on metacpan or  search on metacpan

lib/Goo/CareOMeter.pm  view on Meta::CPAN

		
		select 		title, bugid, importance, 
					date_format(foundon, '%d %b %Y') as 'foundon', 
					description
		from 		bug
		where		status = 'alive'
		order by 	importance desc, foundon desc 
		limit		$BUFFER_SIZE

EOSQL

 view all matches for this distribution


Google-Directions

 view release on metacpan or  search on metacpan

lib/Google/Directions/Client.pm  view on Meta::CPAN


=head1 ATTRIBUTES

=over 4

=item I<keep_alive> Enable keep_alive for the user agent.

B<Warning:> This causes occasional errors due to partial content being returned... I'm not sure
what the root cause for this is... :(

=item I<user_agent> Define a custom L<LWP::UserAgent> if you like.

lib/Google/Directions/Client.pm  view on Meta::CPAN


=back

=cut

has 'keep_alive'            => ( is => 'ro', isa => 'Int',  required => 1, default => 0              );

has 'user_agent'            => ( 
    is          => 'ro', 
    isa         => 'LWP::UserAgent',
    writer      => '_set_user_agent',

lib/Google/Directions/Client.pm  view on Meta::CPAN

# Create a LWP::UserAgent if necessary
around 'user_agent' => sub {
    my $orig = shift;
    my $self = shift;
    unless( $self->_has_user_agent ){
	if( $self->keep_alive and not $ENV{NO_WARN_KEEPALIVE} ){
	    carp( "Warning - keep_alive gives unreliable results - partial JSON returned\n" .
                "Set the enviroment variable NO_WARN_KEEPALIVE to hide this warning\n" );
	}
	my $ua = LWP::UserAgent->new(
	    'keep_alive' => $self->keep_alive,
	    );
        $self->_set_user_agent( $ua );
    }
    return $self->$orig;
};

 view all matches for this distribution


Google-Fusion

 view release on metacpan or  search on metacpan

lib/Google/Fusion.pm  view on Meta::CPAN

=item * access_token <Str>

A temporary access token aquired during the authorization process
Can be defined here, otherwise it will be aquired during the authorization process

=item * keep_alive <Int>

Use keep_alive for connections - this will make the application /much/ more responsive.

Default: 1

=item * headers <Bool>

lib/Google/Fusion.pm  view on Meta::CPAN

has 'access_token'  => ( is => 'ro', isa => 'Str',                                  );
has 'access_code'   => ( is => 'ro', isa => 'Str',                                  );
has 'query_cache'   => ( is => 'ro', isa => 'Str',                                  );
has 'token_store'   => ( is => 'ro', isa => 'Str',                                  );
has 'headers'       => ( is => 'ro', isa => 'Bool', required => 1, default => 1,    );
has 'keep_alive'    => ( is => 'ro', isa => 'Bool', required => 1, default => 1,    );
has 'auth_client'   => ( is => 'ro',                required => 1, lazy => 1,
    isa         => 'Net::OAuth2::Moosey::Client',
    builder     => '_build_auth_client',
    );
has 'insert_buffer'         => ( is => 'rw', isa => 'Str', clearer => 'clear_insert_buffer', default => sub{ '' } );

lib/Google/Fusion.pm  view on Meta::CPAN

        site_url_base           => 'https://accounts.google.com/o/oauth2/auth',
        access_token_url_base   => 'https://accounts.google.com/o/oauth2/token',
        authorize_url_base      => 'https://accounts.google.com/o/oauth2/auth',
        scope                   => 'https://www.google.com/fusiontables/api/query',        
    );
    foreach( qw/client_id client_secret refresh_token access_code access_token keep_alive token_store/ ){
        $client_params{$_} = $self->$_ if defined $self->$_;
    }
    
    # $self->logger->debug( "Initialising Client with:\n".  Dump( \%client_params ) );
    my $client = Net::OAuth2::Moosey::Client->new( %client_params );

 view all matches for this distribution


Google-RestApi

 view release on metacpan or  search on metacpan

t/unit/Test/Google/RestApi.pm  view on Meta::CPAN

  require File::Spec;
  my $dir = File::Spec->catdir($FindBin::RealBin, 'etc');
  my $fh = File::Temp->new(SUFFIX => '.yaml', DIR => $dir, UNLINK => 1);
  print $fh YAML::Any::Dump($data);
  $fh->flush();
  push @_temp_configs, $fh;  # keep object alive; deleted at program end
  return $fh->filename();
}

sub auth : Tests(4) {
  my $self = shift;

 view all matches for this distribution


Graph-Graph6

 view release on metacpan or  search on metacpan

examples/hog-fetch-all.pl  view on Meta::CPAN


# No cookies so get a fresh search each time.
# Or could increment the historyIndex parameter to mean start new search.
# Would that be better, worse, or same?
#
my $mech = WWW::Mechanize->new (keep_alive => 1,
                                cookie_jar => undef);
$mech->agent("$FindBin::Script/$VERSION ".$mech->agent);
# ask for all compressions decoded_content() knows
$mech->add_header('Accept-Encoding' => scalar HTTP::Message::decodable());

 view all matches for this distribution


Graph-Layout-Aesthetic

 view release on metacpan or  search on metacpan

t/02_Aesthetic.t  view on Meta::CPAN

nearly($aglo->temperature, 1e2, "Default temperature is 1e2");
nearly($aglo->end_temperature, 1e-3, "Default end_temperature is 1e-3");
is($aglo->iterations, 1e3, "Default temperature is 1e3");
is($aglo->topology, $topo3, "Topology is available");
$topo3 = undef;
is($topo_destroys, 0, "aglo keeps topology alive");
$force_destroys = 0;
my $force = Graph::Layout::Aesthetic::Force::NodeRepulsion->new;
is($force_destroys, 0, "The force is alive");
$aglo->_add_force($force);
is($force_destroys, 0, "The force is alive");
$force = undef;
is($force_destroys, 0, "The force is alive");
$destroys = 0;
$aglo = undef;
is($destroys, 1, "Cleanup on last reference");
is($topo_destroys, 1, "Toplogy Cleanup on last reference");
is($force_destroys, 1, "The force is gone");

t/02_Aesthetic.t  view on Meta::CPAN

is($aglo->nr_dimensions, 2, "Undef means two dimensions");
$force_destroys = 0;
$force = Graph::Layout::Aesthetic::Force::NodeRepulsion->new;
$aglo->_add_force($force);
$force = undef;
is($force_destroys, 0, "The force is alive");
$aglo->clear_forces;
is($force_destroys, 1, "The force is dead");
$force_destroys = 0;
my $force1 = Graph::Layout::Aesthetic::Force::NodeRepulsion->new;
$aglo->_add_force($force1);
$force1 = undef;
my $force2 = Graph::Layout::Aesthetic::Force::MinEdgeLength->new;
$aglo->_add_force($force2, 2);
$force2 = undef;
is($force_destroys, 0, "The force is alive");
my @forces = $aglo->forces;
is(@forces, 2, "Two forces");
isa_ok($forces[0][0], "Graph::Layout::Aesthetic::Force::MinEdgeLength",
       "Right force type");
is(@{$forces[0]}, 2, "Two element force members");

t/02_Aesthetic.t  view on Meta::CPAN

isa_ok($forces[1][0], "Graph::Layout::Aesthetic::Force::NodeRepulsion",
       "Right force type");
is($forces[1][1], 1, "Right default weight");
KillRef->test($forces[0]);
@forces = ();
is($force_destroys, 0, "The force is alive");

my $forces = $aglo->forces;
is(@$forces, 2, "Two forces");
isa_ok($forces->[0][0], "Graph::Layout::Aesthetic::Force::MinEdgeLength",
       "Right force type");

t/02_Aesthetic.t  view on Meta::CPAN

       "Right force type");
is($forces->[1][1], 1, "Right default weight");
KillRef->test($forces->[0]);
KillRef->test($forces);

is($force_destroys, 0, "The force is alive");
$aglo = undef;
is($force_destroys, 2, "The force is dead");

# Check cleanup on the list form of forces
$aglo = Graph::Layout::Aesthetic->new($topo3, 3);

t/02_Aesthetic.t  view on Meta::CPAN

$aglo->_add_force($force1);
$force1 = undef;
$force2 = Graph::Layout::Aesthetic::Force::MinEdgeLength->new;
$aglo->_add_force($force2, 2);
$force2 = undef;
is($force_destroys, 0, "The force is alive");
@forces = $aglo->forces;

$destroys = 0;
$aglo = undef;
is($destroys, 1, "Cleanup on last reference");

is($force_destroys, 0, "The force is alive");
@forces = 0;
is($force_destroys, 2, "The force is alive");

# Check cleanup on the scalar form of forces
$aglo = Graph::Layout::Aesthetic->new($topo3, 3);
$force_destroys = 0;
$force1 = Graph::Layout::Aesthetic::Force::NodeRepulsion->new;
$aglo->_add_force($force1);
$force1 = undef;
$force2 = Graph::Layout::Aesthetic::Force::MinEdgeLength->new;
$aglo->_add_force($force2, 2);
$force2 = undef;
is($force_destroys, 0, "The force is alive");
$forces = $aglo->forces;

$destroys = 0;
$aglo = undef;
is($destroys, 1, "Cleanup on last reference");

is($force_destroys, 0, "The force is alive");
$forces = undef;
is($force_destroys, 2, "The force is alive");

$force_destroys = 0;
$aglo = Graph::Layout::Aesthetic->new($topo3, 3);
eval { $aglo->_add_force(undef) };
like($@, qr!force is undefined at !i, "Proper error message");

t/02_Aesthetic.t  view on Meta::CPAN

       "Right force type");
is($forces[1][1], 1, "Right default weight");
$destroys = 0;
$aglo = undef;
is($destroys, 1, "Cleanup on last reference");
is($force_destroys, 0, "Manager keeps forces alive");

# Getting and setting coordinates
$aglo = Graph::Layout::Aesthetic->new($topo3);
eval { $aglo->coordinates };
like($@, qr!Usage: Graph::Layout::Aesthetic::coordinates\(state, vertex, \.\.\.\) at !,

 view all matches for this distribution


Graph-Maker-Other

 view release on metacpan or  search on metacpan

lib/Graph/Maker/FibonacciTree.pm  view on Meta::CPAN

     tree(H-2) node    tree(H-2)
       /   \    |       /    \
     ...  ...  ...    ...   ...

This is the genealogy of Fibonacci's rabbit pairs.  The root node 1 is a
pair of adult rabbits.  They remain alive as node 2 and they have a pair of
baby rabbits as node 3.  Those babies do not breed immediately but only in
the generation after at node 6.  Every right tree branch is a baby rabbit
pair which does not begin breeding until the month after.

The tree branching follows the Fibonacci word.  The Fibonacci word begins as

 view all matches for this distribution


GraphQL-Plugin-Convert-MojoPubSub

 view release on metacpan or  search on metacpan

Makefile.PL  view on Meta::CPAN

  CONFIGURE_REQUIRES => {
    'ExtUtils::MakeMaker' => '7.10',
  },
  TEST_REQUIRES => {
    'Test::More' => '0.98',
    'Mojolicious::Plugin::GraphQL' => '0.16', # keepalive
    'Test::Snapshot' => '0.02', # better snapshot filenames
  },
  PREREQ_PM => {
    'GraphQL' => '0.40', # subscriptions
  },

 view all matches for this distribution


Graphite-Enumerator

 view release on metacpan or  search on metacpan

bin/find-unused-graphite-metrics.pl  view on Meta::CPAN

my $gren = Graphite::Enumerator->new(
    host => 'https://graphite.example.com',
    basepath => $basepath,
    lwp_options => {
        env_proxy => 0,
        keep_alive => 1,
    },
);

$gren->enumerate( sub {
    my ($path) = @_;

 view all matches for this distribution


Grimlock

 view release on metacpan or  search on metacpan

script/grimlock_web_server.pl  view on Meta::CPAN

   -f --fork            MAKE NEW PROCESS FOR REQUEST
                        (DEFAULT NO TRUE)
   -? --help            SHOW HELP PAGE FOR DUMMY WHO NO CAN REMEMBER HOW GRIMLOCK WORK
   -h --host            NAME OF COMPUTER TO RUN GRIMLOCK BEAUTIFUL BLOG SOFTWARE
   -p --port            NUMBER OF THINGY TO MAKE CONNECTION TO GRIMLOCK BLOG
   -k --keepalive       SPARE CONNECTION PUNY LIFE
   -r --restart         RESTART WHEN GET FRUSTRATED AND SMASH FILES
                        (DEFAULT NO TRUE)
   -rd --restart_delay  SLOW RESTART BLOG WHEN SMASH FILES
                  
   -rr --restart_regex  RESTART WHEN THINGIES THAT MATCH ARE SMASHED

 view all matches for this distribution


Gtk-Perl

 view release on metacpan or  search on metacpan

Gtk/xs/GtkObject.xs  view on Meta::CPAN


MODULE = Gtk::Object		PACKAGE = Gtk::Object		PREFIX = gtk_object_

#ifdef GTK_OBJECT

# FIXME: See if we need signal_connect_while_alive

int
signal_connect(object, event, handler, ...)
	Gtk::Object	object
	char *	event

 view all matches for this distribution


Gtk2-Ex-ComboBoxBits

 view release on metacpan or  search on metacpan

t/Test/Weaken/ExtraBits.pm  view on Meta::CPAN

created permanently for each driver loaded, and which C<DBI::db> handles
then refer to.

A bug/misfeature of Perl through to at least 5.10.1 on lvalue C<substr>
means certain scratchpad temporaries of DBI "ImplementorClass" strings end
up held alive after C<DBI::db> and C<DBI::st> objects have finished with
them.  These aren't recognised by C<ignore_DBI_globals> currently.
A workaround is to do a dummy C<DBI::db> creation to flush out the old
scratchpad.

=back

 view all matches for this distribution


Gtk2-Ex-Dragger

 view release on metacpan or  search on metacpan

lib/Gtk2/Ex/Dragger.pm  view on Meta::CPAN


There's not much in the standard cursors for a grasping hand so you probably
have to make something like that from a pixmap.

Currently only a weak reference is kept to the target widget, so the fact
there's a dragger feature doesn't keep it alive forever.  This means in
particular it's safe to hold the dragger object in the widget instance data
without creating a circular reference.  But strong references are kept to
the adjustment objects since they probably should stay alive as long as the
widget and dragger do.  But perhaps this will change.

Having the C<button-motion-mask> and C<button-release-mask> set before the
drag won't normally cost very many extra events.

 view all matches for this distribution


Gtk2-Ex-ErrorTextDialog

 view release on metacpan or  search on metacpan

devel/AddOn-FollowAppend.pm  view on Meta::CPAN

The FollowAppend works with whatever TextBuffer, if any, is set in
C<$textview> at a given time.  It doesn't need a textbuf set initially, and
any textbuf can be changed or unset later.

C<$follow> only keeps a weak reference to C<$textview> so the mere
FollowAppend feature doesn't keep C<$textview> alive if nobody else cares if
it lives or dies.  On that basis it's safe to hold C<$follow> in the hash of
C<$textview> itself,

    $textview->{'follow'} = Gtk2::Ex::TextView::FollowAppend->new($textview);

 view all matches for this distribution


Gtk2-Ex-TickerView

 view release on metacpan or  search on metacpan

devel/Pause-backup.pm  view on Meta::CPAN

the timer scrolling in C<$tickerview>.  When you discard the object it
releases the pause, allowing scrolling to resume (once there's no other
Pauses, and the ticker C<run> is active, etc).

The Pause object only keeps a weak reference to C<$tickerview>, so the mere
fact you want to pause it doesn't keep it alive.  This also means it's safe
to hold a pause object somewhere within C<$tickerview> itself without
creating a circular reference.

=back

 view all matches for this distribution


Gtk2-Ex-TiedListColumn

 view release on metacpan or  search on metacpan

t/TiedListColumn.t  view on Meta::CPAN

{
  my $store = Gtk2::ListStore->new ('Glib::String');
  my $aref = Gtk2::Ex::TiedListColumn->new ($store);
  require Scalar::Util;
  Scalar::Util::weaken ($store);
  ok ($store, 'store held alive by aref');
  $aref = undef;
  is ($store, undef, 'then garbage collected when aref gone');
}


 view all matches for this distribution


Gtk2-Ex-WidgetBits

 view release on metacpan or  search on metacpan

lib/Gtk2/Ex/FreezeChildNotify.pm  view on Meta::CPAN


FreezeChildNotify works by having C<thaw_child_notify> in the destroy code
of the FreezeChildNotify object.

FreezeChildNotify only holds weak references to its widgets, so the mere
fact they're due for later thawing doesn't keep them alive if nothing else
cares whether they live or die.  The effect is that frozen widgets can be
garbage collected within a freeze block at the same point they would be
without any freezing, instead of extending their life to the end of the
block.

 view all matches for this distribution


Gtk2

 view release on metacpan or  search on metacpan

ChangeLog.pre-git  view on Meta::CPAN

	* xs/GtkTreeView.xs: Describe the return values of
	get_visible_range and get_tooltip_context.  Patch by Kevin Ryde.

	* xs/GtkTreeModel.xs: In the POD section about tree iterators, add
	a paragraph explaining how data put into iterators needs to be
	kept alive by the model.  Patch by Kevin Ryde.

2008-04-20  Torsten Schoenfeld  <kaffeetisch@gmx.de>

	* t/GdkDisplay.t
	* xs/GdkDisplay.xs: Allow undef for the display name parameter of

ChangeLog.pre-git  view on Meta::CPAN


	* t/GtkItemFactory.t: don't forget to return a string from the
	translation func

	* xs/GtkItemFactory.xs: keep the value returned from the perl
	callback alive long enough to be used by the caller.

2004/01/24 21:44 (-0500) rwmcfa1

	* Makefile.PL: removed runtime_reqs stuff, replaced by the pkg-config
	trick

 view all matches for this distribution


( run in 1.876 second using v1.01-cache-2.11-cpan-39bf76dae61 )