view release on metacpan or search on metacpan
lib/Finance/Bitcoin/Feed/Site/BitStamp/Socket.pm view on Meta::CPAN
package Finance::Bitcoin::Feed::Site::BitStamp::Socket;
use strict;
use warnings;
use parent qw(Finance::Bitcoin::Feed::Pusher);
use Scalar::Util qw(weaken);
sub new {
my $self = shift->SUPER::new(channels => [qw/live_trades/]);
$self->{owner} = shift;
#weaken it to prevent from crossing reference
weaken($self->{owner});
return $self;
}
sub trade {
my $self = shift;
view all matches for this distribution
view release on metacpan or search on metacpan
CompanyNames/TextSupport.pm view on Meta::CPAN
way ways
waybill waybills
waypoint waypoints
wayward waywardness
weak weaker weakly weakness weaknesses
weaken weakened weakening weakens
wealth wealthier wealthy
wean weaned weaning
weapon weaponization weaponized weapons
wear wearability wearable wearables wearer wearers wearing wears
wearier wearily weariness weary
CompanyNames/TextSupport.pm view on Meta::CPAN
ways
wayside
wayward
we
weak
weaken
weakened
weakening
weakens
weaker
weakest
weakly
weakness
weaknesses
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Class/MOP.pm view on Meta::CPAN
use 5.008;
use MRO::Compat;
use Carp 'confess';
use Scalar::Util 'weaken', 'isweak', 'reftype', 'blessed';
use Data::OptList;
use Try::Tiny;
use Class::MOP::Mixin::AttributeCore;
use Class::MOP::Mixin::HasAttributes;
inc/Class/MOP.pm view on Meta::CPAN
sub get_all_metaclasses { %METAS }
sub get_all_metaclass_instances { values %METAS }
sub get_all_metaclass_names { keys %METAS }
sub get_metaclass_by_name { $METAS{$_[0]} }
sub store_metaclass_by_name { $METAS{$_[0]} = $_[1] }
sub weaken_metaclass { weaken($METAS{$_[0]}) }
sub metaclass_is_weak { isweak($METAS{$_[0]}) }
sub does_metaclass_exist { exists $METAS{$_[0]} && defined $METAS{$_[0]} }
sub remove_metaclass_by_name { delete $METAS{$_[0]}; return }
# This handles instances as well as class names
view all matches for this distribution
view release on metacpan or search on metacpan
sv_reftype|||
sv_release_COW|||
sv_replace|||
sv_report_used|||
sv_reset|||
sv_rvweaken||5.006000|
sv_setiv_mg|5.004050||p
sv_setiv|||
sv_setnv_mg|5.006000||p
sv_setnv|||
sv_setpv_mg|5.004050||p
view all matches for this distribution
view release on metacpan or search on metacpan
t/MyTestHelpers.pm view on Meta::CPAN
} else {
MyTestHelpers::diag ("Devel::FindRef not available -- ", $@);
}
}
sub test_weaken_show_leaks {
my ($leaks) = @_;
$leaks || return;
my $unfreed = $leaks->unfreed_proberefs;
my $unfreed_count = scalar(@$unfreed);
view all matches for this distribution
view release on metacpan or search on metacpan
xs/include/ppport.h view on Meta::CPAN
sv_release_COW|||
sv_replace|||
sv_report_used|||
sv_resetpvn|||
sv_reset|||
sv_rvweaken||5.006000|
sv_sethek|||
sv_setiv_mg|5.004050||p
sv_setiv|||
sv_setnv_mg|5.006000||p
sv_setnv|||
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Fluent/LibFluentBit.pm view on Meta::CPAN
# constructor registers the instance
sub new {
my $class= shift;
my $self= Fluent::LibFluentBit::flb_create();
bless $self, $class if $class ne 'Fluent::LibFluentBit';
Scalar::Util::weaken( $instances{0+$self}= $self );
$self->configure((@_ == 1 && ref $_[0] eq 'HASH')? %{$_[0]} : @_);
}
# destructor flushes cached messages and unregisters the instance
sub DESTROY {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Form/Processor.pm view on Meta::CPAN
sub parent_field {
my $self = shift;
return Scalar::Util::weaken( $self->{parent_field} = shift ) if ( @_ );
return $self->{parent_field};
}
lib/Form/Processor.pm view on Meta::CPAN
If a form has a parent_field associated with it then any errors will be pushed
onto the parent_field instead of the current field. In the date example, an error
in the year field will cause the error to be assigned to the date field, not directly
on the year field.
This stores a weakened value.
=back
=head1 CREATING A MODEL CLASS
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Form/Tiny/Plugin/Diva.pm view on Meta::CPAN
roles => [__PACKAGE__],
meta_roles => ['Form::Tiny::Plugin::Diva::MetaRole'],
};
}
use Scalar::Util qw(weaken);
use Moo::Role;
has 'diva' => (
is => 'ro',
builder => '_build_diva',
lib/Form/Tiny/Plugin/Diva.pm view on Meta::CPAN
hidden => \@hidden,
form_instance => $self,
);
weaken $obj->{form_instance};
return $obj;
}
1;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Form/Tiny/Manual.pod view on Meta::CPAN
handle. This can help debugging and prevent errors.
B<Important note>: Strict mode will cause the system to crawl your entire input
data to search for any odd elements. This will cause validation to only run at
about half the speed, and more importantly it will not be able to cope with
circular references (even weakened). If your input data may contain circular
references you should not make use of the strict mode.
=head3 Filters
Turned on by L<Form::Tiny::Plugin::Filtered> plugin or with the C<-filtered>
view all matches for this distribution
view release on metacpan or search on metacpan
inc/DBIx/Class/Schema.pm view on Meta::CPAN
use strict;
use warnings;
use DBIx::Class::Exception;
use Carp::Clan qw/^DBIx::Class/;
use Scalar::Util qw/weaken/;
use File::Spec;
use Sub::Name ();
use Module::Find();
use base qw/DBIx::Class/;
inc/DBIx/Class/Schema.pm view on Meta::CPAN
my $orig_source = $source;
$source = $source->new({ %$source, source_name => $moniker });
$source->schema($self);
weaken($source->{schema}) if ref($self);
my $rs_class = $source->result_class;
my %reg = %{$self->source_registrations};
$reg{$moniker} = $source;
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Spiffy.pm view on Meta::CPAN
" return \$_[0]->{%s} = do { my \$self = \$_[0]; %s }\n" .
" unless \$#_ > 0 or defined \$_[0]->{%s};\n",
weak_init =>
" return do {\n" .
" \$_[0]->{%s} = do { my \$self = \$_[0]; %s };\n" .
" Scalar::Util::weaken(\$_[0]->{%s}) if ref \$_[0]->{%s};\n" .
" \$_[0]->{%s};\n" .
" } unless \$#_ > 0 or defined \$_[0]->{%s};\n",
return_if_get =>
" return \$_[0]->{%s} unless \$#_ > 0;\n",
set =>
" \$_[0]->{%s} = \$_[1];\n",
weaken =>
" Scalar::Util::weaken(\$_[0]->{%s}) if ref \$_[0]->{%s};\n",
sub_end =>
" return \$_[0]->{%s};\n}\n",
);
sub field {
inc/Spiffy.pm view on Meta::CPAN
local *paired_arguments = sub { (qw(-package -init)) };
Spiffy->parse_arguments(@_);
};
my ($field, $default) = @values;
$package = $args->{-package} if defined $args->{-package};
die "Cannot have a default for a weakened field ($field)"
if defined $default && $args->{-weak};
return if defined &{"${package}::$field"};
require Scalar::Util if $args->{-weak};
my $default_string =
( ref($default) eq 'ARRAY' and not @$default )
inc/Spiffy.pm view on Meta::CPAN
}
$code .= sprintf $code{set_default}, $field, $default_string, $field
if defined $default;
$code .= sprintf $code{return_if_get}, $field;
$code .= sprintf $code{set}, $field;
$code .= sprintf $code{weaken}, $field, $field
if $args->{-weak};
$code .= sprintf $code{sub_end}, $field;
my $sub = eval $code;
die $@ if $@;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Forward/Routes.pm view on Meta::CPAN
use 5.010001;
use Forward::Routes::Match;
use Forward::Routes::Pattern;
use Forward::Routes::Resources;
use Scalar::Util qw/weaken/;
use Carp 'croak';
our $VERSION = '0.56';
lib/Forward/Routes.pm view on Meta::CPAN
my $self = shift;
my ($value) = @_;
return $self->{parent} unless $value;
$self->{parent} = $value;
weaken $self->{parent};
return $self;
}
sub add_child {
view all matches for this distribution
view release on metacpan or search on metacpan
lang_en/conceptnet-commonsense-is-4.pro view on Meta::CPAN
designed <> situation <> a wingnut <> <> be hand <> nothing <> nothing <> tightened by tightened by tightened by <> xxtoxx <> <> 50
is <> situation a soldering iron <> a tool <> <> is <> nothing <> nothing <> heated electrically <> that <> ;; melt <> solder <> nothing <> <> xxtoxx <> ;; join <> metal <> parts <> <> xxtoxx <> ;; join <> metal <> eg together plumbing <> <> x...
is <> situation a soldering iron <> a tool <> <> means <> nothing <> nothing <> <> <> ;; melt <> solder <> nothing <> <> xxtoxx <> ;; join <> metal <> parts <> <> xxtoxx <> ;; join <> metal <> eg together plumbing <> <> xxtoxx <> ;; join <>...
is <> situation a soldering iron <> a tool <> <> used <> nothing <> nothing <> <> <> ;; melt <> solder <> nothing <> <> xxtoxx <> ;; join <> metal <> parts <> <> xxtoxx <> ;; join <> metal <> eg together plumbing <> <> xxtoxx <> ;; join <> ...
is used <> situation solder <> a metal alloy melting point <> with a low <> join <> metal <> parts <> together <> xxtoxx <> <> 50
is <> situation a joint <> a soldered <> dry <> is <> or <> nothing <> weakened defective <> that <> <> 50
is orbiting <> two bodies <> mars <> there <> <> <> nothing <> <> <> <> 50
is <> a acrylic <> plastic <> <> <> <> nothing <> <> <> <> 50
is used <> a output <> device <> printer <> based convert <> electronic data <> data <> to paper <> xxtoxx <> <> 50
is <> mine <> a weapon <> <> <> <> nothing <> <> <> <> 50
is <> situation a opinion <> a statement <> (supposedly_formed_by_observation);on a topic of topics <> <> <> nothing <> <> <> <> 50
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Spiffy.pm view on Meta::CPAN
" return \$_[0]->{%s} = do { my \$self = \$_[0]; %s }\n" .
" unless \$#_ > 0 or defined \$_[0]->{%s};\n",
weak_init =>
" return do {\n" .
" \$_[0]->{%s} = do { my \$self = \$_[0]; %s };\n" .
" Scalar::Util::weaken(\$_[0]->{%s}) if ref \$_[0]->{%s};\n" .
" \$_[0]->{%s};\n" .
" } unless \$#_ > 0 or defined \$_[0]->{%s};\n",
return_if_get =>
" return \$_[0]->{%s} unless \$#_ > 0;\n",
set =>
" \$_[0]->{%s} = \$_[1];\n",
weaken =>
" Scalar::Util::weaken(\$_[0]->{%s}) if ref \$_[0]->{%s};\n",
sub_end =>
" return \$_[0]->{%s};\n}\n",
);
sub field {
inc/Spiffy.pm view on Meta::CPAN
local *paired_arguments = sub { (qw(-package -init)) };
Spiffy->parse_arguments(@_);
};
my ($field, $default) = @values;
$package = $args->{-package} if defined $args->{-package};
die "Cannot have a default for a weakened field ($field)"
if defined $default && $args->{-weak};
return if defined &{"${package}::$field"};
require Scalar::Util if $args->{-weak};
my $default_string =
( ref($default) eq 'ARRAY' and not @$default )
inc/Spiffy.pm view on Meta::CPAN
}
$code .= sprintf $code{set_default}, $field, $default_string, $field
if defined $default;
$code .= sprintf $code{return_if_get}, $field;
$code .= sprintf $code{set}, $field;
$code .= sprintf $code{weaken}, $field, $field
if $args->{-weak};
$code .= sprintf $code{sub_end}, $field;
my $sub = eval $code;
die $@ if $@;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Froody/API/XML.pm view on Meta::CPAN
use Froody::Response::String;
use Froody::Logger;
my $logger = get_logger("froody.api.xml");
use base qw(Froody::API);
use Scalar::Util qw(weaken);
=head1 NAME
Froody::API::XML - Define a Froody API with xml
lib/Froody/API/XML.pm view on Meta::CPAN
my $example = Froody::Response::String->new;
$example->set_string("<rsp status='ok'>".$response_element->toString(1)."</rsp>");
$example->structure($method);
$method->example_response($example);
weaken($example->{structure});
} else {
$method->structure({})
}
my $desc = $method_element->findvalue("./description");
lib/Froody/API/XML.pm view on Meta::CPAN
my $example = Froody::Response::String->new;
$et_element->setNodeName("err");
my $text = "<rsp status='fail'>".$et_element->toString(1)."</rsp>";
$example->set_bytes($text);
$example->structure($et);
weaken($example->{structure});
$et->example_response($example);
return $et;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Frost.pm view on Meta::CPAN
objects blessed in an anonymous class. This destroys the silence/evoke
mechanism, which depends on the real classname.
So reblessing as well as make_mutable is VERBOTEN.
=head2 Thou shalt not weaken thy reference
Due to Frost's proxy algorithm there is no need for weak references.
See L</MOTIVATION>.
=head2 Thou shalt not create or load objects without an id and thy asylum
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Full/Pragmata.pm view on Meta::CPAN
=item * L<Future::AsyncAwait>
=item * L<Future::AsyncAwait::Hooks> - added in C< :v2 >
=item * provides L<Scalar::Util/blessed>, L<Scalar::Util/weaken>, L<Scalar::Util/refaddr>
=item * provides L<List::Util/min>, L<List::Util/max>, L<List::Util/sum0>
=item * provides L<List::Util/uniqstr> - added in C< :v2 >
lib/Full/Pragmata.pm view on Meta::CPAN
# to have minimal inheritance in the first place, but might as well have a standard
# decision to avoid surprises in future
mro::set_mro($pkg => 'c3');
# Helper functions which are used often enough to be valuable as a default
Scalar::Util->export($pkg => qw(refaddr blessed weaken));
List::Util->export($pkg => qw(min max sum0));
# Additional features in :v2 onwards
List::Util->export($pkg => qw(uniqstr));
# eval "package $pkg; use Object::Pad::FieldAttr::Checked; use Data::Checks qw(NumGE); 1" or die $@;
view all matches for this distribution
view release on metacpan or search on metacpan
t/lib/Test/Resub.pm view on Meta::CPAN
our $VERSION = 2.02;
use Carp qw(croak);
use Storable qw(dclone);
use Scalar::Util qw(weaken);
sub default_replacement_sub { sub {} }
sub set_prototype(&$) {
if (_implements('Scalar::Util','set_prototype')) {
goto \&Scalar::Util::set_prototype;
t/lib/Test/Resub.pm view on Meta::CPAN
autovivified => $autovivified,
stashed_variables => _save_variables($args{name}),
deep_copy => $args{deep_copy},
}, $class;
weaken(my $weak_self = $self);
my $wrapper_for_code = set_prototype(sub {
$weak_self->{called}++;
$weak_self->{was_called} = 1;
push @{$weak_self->{args}}, ($weak_self->{deep_copy}
? do {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/FP/Abstract/Sequence.pm view on Meta::CPAN
#XXX other
# group group_by
# zip2
# XXX these don't weaken the caller arguments, thus will leak for
# streams. How to solve this (and not copy-paste-adapt the methods
# manually) without fixing perl?
sub flatten {
@_ == 1 or @_ == 2 or fp_croak_arity "1 or 2";
lib/FP/Abstract/Sequence.pm view on Meta::CPAN
sub split_at {
@_ == 2 or fp_croak_arity 2;
my ($s, $pos) = @_;
# XXX weaken as all of them.
($s->take($pos), $s->drop($pos))
}
sub chunks_of {
@_ == 2 or fp_croak_arity 2;
my ($s, $chunklen) = @_;
# XXX weaken as all of them.
$s->stream->chunks_of($chunklen)
}
sub strictly_chunks_of {
@_ == 2 or fp_croak_arity 2;
my ($s, $chunklen) = @_;
# XXX weaken as all of them.
$s->stream->strictly_chunks_of($chunklen)
}
# join in Haskell is doing "++" on the items, should probably choose a
# protocol for this as well; for now, hard-code to strings_join:
sub join {
my ($s) = @_;
# Tail-call, please, for 'weakening maintenance'.
# XX only AUTOLOAD is defined, not `can`! But $s was already
# forced by the AUTOLOAD thus nothing more is needed here. But
# this might change!
my $m = $s->can("strings_join")
view all matches for this distribution
view release on metacpan or search on metacpan
sv_release_COW|||
sv_release_IVX|||
sv_replace|||
sv_report_used|||
sv_reset|||
sv_rvweaken||5.006000|
sv_setiv_mg|5.006000||p
sv_setiv|||
sv_setnv_mg|5.006000||p
sv_setnv|||
sv_setpv_mg|5.006000||p
view all matches for this distribution
view release on metacpan or search on metacpan
test/fuse28.pm view on Meta::CPAN
#
package test::fuse28::Directory;
use Fcntl qw(:mode);
use base qw(test::fuse28::Entity);
use Scalar::Util qw(weaken);
sub new {
my $class = shift;
my $parent = shift;
test/fuse28.pm view on Meta::CPAN
}
$self->{children} = {};
# avoid cyclic reference
weaken($self->{parent});
bless $self, $class;
}
sub parent {
test/fuse28.pm view on Meta::CPAN
# Symlink
#
package test::fuse28::Symlink;
use base qw(test::fuse28::Entity);
use Scalar::Util qw(weaken);
sub new {
my $class = shift;
my ($existing) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Future/AsyncAwait/Frozen.c view on Meta::CPAN
if(SvREFCNT(curcv) < 2) {
croak("AWAIT_ON_READY failed to capture the CV");
}
state->awaiting_future = newSVsv(f);
sv_rvweaken(state->awaiting_future);
if(!state->returning_future)
state->returning_future = future_new_from_proto(f);
if(defer_mortal_curcv)
lib/Future/AsyncAwait/Frozen.c view on Meta::CPAN
PUSHMARK(SP);
mPUSHs(newSVsv(state->returning_future));
PUTBACK;
if(!SvWEAKREF(state->returning_future))
sv_rvweaken(state->returning_future);
if(!SvROK(state->returning_future))
panic("ARGH we lost state->returning_future for curcv=%p\n", curcv);
/* For unknown reasons, doing this on perls 5.20 or 5.22 massively breaks
* everything.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Future/AsyncAwait.xs view on Meta::CPAN
if(SvREFCNT(curcv) < 2) {
croak("AWAIT_ON_READY failed to capture the CV");
}
state->awaiting_future = newSVsv(f);
sv_rvweaken(state->awaiting_future);
if(!state->returning_future) {
state->returning_future = future_new_from_proto(f);
if(precancel) {
lib/Future/AsyncAwait.xs view on Meta::CPAN
PUSHMARK(SP);
mPUSHs(newSVsv(state->returning_future));
PUTBACK;
if(!SvWEAKREF(state->returning_future))
sv_rvweaken(state->returning_future);
if(!SvROK(state->returning_future))
panic("ARGH we lost state->returning_future for curcv=%p\n", curcv);
#ifdef HAVE_FUTURE_CHAIN_CANCEL
future_chain_on_cancel(state->returning_future, state->awaiting_future);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Future/Buffer.pm view on Meta::CPAN
use v5.14;
use warnings;
use Future;
use Scalar::Util qw( weaken );
=head1 NAME
C<Future::Buffer> - a string buffer that uses Futures
lib/Future/Buffer.pm view on Meta::CPAN
my $fill = $self->{fill};
# Arm the fill loop
my $f = $self->{fill_f} = $fill->(); # TODO: give it a size hint?
weaken( my $weakself = $self );
$f->on_done( sub {
my $self = $weakself or return;
undef $self->{fill_f};
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Future/Mojo.pm view on Meta::CPAN
package Future::Mojo;
use strict;
use warnings;
use Carp 'croak';
use Scalar::Util 'blessed', 'weaken';
use Mojo::IOLoop;
use Role::Tiny::With;
use parent 'Future';
lib/Future/Mojo.pm view on Meta::CPAN
}
sub _set_timer {
my ($self, $succeed, $after) = @_;
weaken(my $weakself = $self);
my $cb = $succeed ? sub { $weakself->done if $weakself }
: sub { $weakself->fail('Timeout') if $weakself };
my $id = $self->loop->timer($after => $cb);
$self->on_cancel(sub { shift->loop->remove($id) });
lib/Future/Mojo.pm view on Meta::CPAN
if $self->loop->is_running;
$self->loop->one_tick until $self->is_ready;
}
sub done_next_tick {
weaken(my $self = shift);
my @result = @_;
$self->loop->next_tick(sub { $self->done(@result) if $self });
return $self;
}
sub fail_next_tick {
weaken(my $self = shift);
my ($exception, @details) = @_;
croak 'Expected a true exception' unless $exception;
$self->loop->next_tick(sub { $self->fail($exception, @details) if $self });
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Future/Q.pm view on Meta::CPAN
use strict;
use warnings;
use Future 0.29;
use parent "Future";
use Devel::GlobalDestruction;
use Scalar::Util qw(refaddr blessed weaken);
use Carp;
use Try::Tiny ();
our $VERSION = '0.120';
lib/Future/Q.pm view on Meta::CPAN
$return_future = $class->try($on_fulfilled, $invo_future->get);
}
$next_future->resolve($return_future);
});
if($next_future->is_pending && $self->is_pending) {
weaken(my $invo_future = $self);
$next_future->on_cancel(sub {
if(defined($invo_future) && $invo_future->is_pending) {
$invo_future->cancel();
}
});
lib/Future/Q.pm view on Meta::CPAN
}else {
$self->fulfill($base_future->get);
}
});
if(!$base_future->is_ready) {
weaken(my $weak_base = $base_future);
$self->on_cancel(sub {
$weak_base->cancel() if defined($weak_base) && !$weak_base->is_ready;
});
}
return $self;
lib/Future/Q.pm view on Meta::CPAN
}else {
$next_future->resolve($invo_future);
}
});
if(!$returned_future->is_ready) {
weaken(my $weak_returned = $returned_future);
$next_future->on_cancel(sub {
$weak_returned->cancel if defined($weak_returned) && !$weak_returned->is_ready;
});
}
});
if(!$self->is_ready) {
weaken(my $weak_invo = $self);
$next_future->on_cancel(sub {
$weak_invo->cancel if defined($weak_invo) && !$weak_invo->is_ready;
});
}
view all matches for this distribution
view release on metacpan or search on metacpan
src/future.c view on Meta::CPAN
}
else {
struct FutureXS *f2self = get_future(f2);
struct FutureXSCallback cb2 = {
.flags = CB_DONE|CB_FAIL|CB_IS_FUTURE,
.code = sv_rvweaken(newSVsv(fseq)),
};
push_callback(f2self, &cb2);
}
assert(SvREFCNT(f2) == 1);
src/future.c view on Meta::CPAN
cb->flags |= CB_DONE|CB_FAIL;
if(cb->seq.thencode)
cb->seq.thencode = wrap_cb(f1, "sequence", sv_2mortal(cb->seq.thencode));
if(cb->seq.elsecode)
cb->seq.elsecode = wrap_cb(f1, "sequence", sv_2mortal(cb->seq.elsecode));
cb->seq.f = sv_rvweaken(newSVsv(fseq));
push_callback(self, cb);
return fseq;
}
src/future.c view on Meta::CPAN
if(is_future) {
struct FutureXSRevocation *rev;
Newx(rev, 1, struct FutureXSRevocation);
rev->precedent_f = sv_rvweaken(newSVsv(f));
rev->toclear_sv_at = sv_rvweaken(newRV_inc(rv));
struct FutureXS *codeself = get_future(code);
if(!codeself->revoke_when_ready)
codeself->revoke_when_ready = newAV();
src/future.c view on Meta::CPAN
return f;
}
CV *sub_on_ready = newXS(NULL, sub_on_ready_waitall, __FILE__);
cv_set_anysv_refcounted(sub_on_ready, newSVsv(f));
sv_rvweaken(CvXSUBANY_sv(sub_on_ready));
GV *gv = gv_fetchpvs("Future::XS::(wait_all callback)", GV_ADDMULTI, SVt_PVCV);
CvGV_set(sub_on_ready, gv);
CvANON_off(sub_on_ready);
src/future.c view on Meta::CPAN
self->pending_subs = 0;
CV *sub_on_ready = newXS(NULL, sub_on_ready_waitany, __FILE__);
cv_set_anysv_refcounted(sub_on_ready, newSVsv(f));
sv_rvweaken(CvXSUBANY_sv(sub_on_ready));
GV *gv = gv_fetchpvs("Future::XS::(wait_any callback)", GV_ADDMULTI, SVt_PVCV);
CvGV_set(sub_on_ready, gv);
CvANON_off(sub_on_ready);
src/future.c view on Meta::CPAN
self->pending_subs = 0;
CV *sub_on_ready = newXS(NULL, sub_on_ready_needsall, __FILE__);
cv_set_anysv_refcounted(sub_on_ready, newSVsv(f));
sv_rvweaken(CvXSUBANY_sv(sub_on_ready));
GV *gv = gv_fetchpvs("Future::XS::(needs_all callback)", GV_ADDMULTI, SVt_PVCV);
CvGV_set(sub_on_ready, gv);
CvANON_off(sub_on_ready);
src/future.c view on Meta::CPAN
self->pending_subs = 0;
CV *sub_on_ready = newXS(NULL, sub_on_ready_needsany, __FILE__);
cv_set_anysv_refcounted(sub_on_ready, newSVsv(f));
sv_rvweaken(CvXSUBANY_sv(sub_on_ready));
GV *gv = gv_fetchpvs("Future::XS::(needs_any callback)", GV_ADDMULTI, SVt_PVCV);
CvGV_set(sub_on_ready, gv);
CvANON_off(sub_on_ready);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Future/PP.pm view on Meta::CPAN
our @ISA = qw( Future::_base );
use Carp qw(); # don't import croak
use List::Util 1.29 qw( pairs pairkeys );
use Scalar::Util qw( weaken blessed reftype );
use Time::HiRes qw( gettimeofday );
our @CARP_NOT = qw( Future Future::_base Future::Utils );
use constant DEBUG => !!$ENV{PERL_FUTURE_DEBUG};
lib/Future/PP.pm view on Meta::CPAN
$fail ? $code->fail( @result ) :
$code->cancel;
}
elsif( $flags & (CB_SEQ_ONDONE|CB_SEQ_ONFAIL) ) {
my ( undef, undef, $fseq ) = @$cb;
if( !$fseq ) { # weaken()ed; it might be gone now
# This warning should always be printed, even not in DEBUG mode.
# It's always an indication of a bug
Carp::carp +(DEBUG ? "${\$self->__selfstr} ($self->{constructed_at})"
: "${\$self->__selfstr} $self" ) .
" lost a sequence Future";
lib/Future/PP.pm view on Meta::CPAN
if( $f2->is_ready ) {
$f2->on_ready( $fseq ) if !$f2->{cancelled};
}
else {
push @{ $f2->{callbacks} }, [ CB_DONE|CB_FAIL, $fseq ];
weaken( $f2->{callbacks}[-1][1] );
}
}
else {
$code->(
( $flags & CB_SELF ? $self : () ),
lib/Future/PP.pm view on Meta::CPAN
$self->{ready} and return $self;
push @{ $self->{on_cancel} }, $code;
if( $is_future ) {
push @{ $code->{revoke_when_ready} }, my $r = [ $self, \$self->{on_cancel}[-1] ];
weaken( $r->[0] );
weaken( $r->[1] );
}
return $self;
}
lib/Future/PP.pm view on Meta::CPAN
my $self = shift;
my ( $f2 ) = @_;
push @{ $self->{on_cancel} }, $f2;
push @{ $f2->{revoke_when_ready} }, my $r = [ $self, \$self->{on_cancel}[-1] ];
weaken( $r->[0] );
weaken( $r->[1] );
}
sub _revoke_on_cancel
{
my $self = shift;
lib/Future/PP.pm view on Meta::CPAN
# TODO: if anyone cares about the op name, we might have to synthesize it
# from $flags
$code = $f1->wrap_cb( sequence => $code ) unless $flags & (CB_SEQ_IMDONE|CB_SEQ_IMFAIL);
push @{ $f1->{callbacks} }, [ CB_DONE|CB_FAIL|$flags, $code, $fseq ];
weaken( $f1->{callbacks}[-1][2] );
return $fseq;
}
sub then
lib/Future/PP.pm view on Meta::CPAN
$self->{result} = [ @subs ];
$self->_mark_ready( "wait_all" );
return $self;
}
weaken( my $weakself = $self );
my $sub_on_ready = sub {
return unless my $self = $weakself;
$pending--;
$pending and return;
lib/Future/PP.pm view on Meta::CPAN
return $self;
}
my $pending = 0;
weaken( my $weakself = $self );
my $sub_on_ready = sub {
return unless my $self = $weakself;
return if $self->{result} or $self->{failure}; # don't recurse on child ->cancel
return if --$pending and $_[0]->{cancelled};
lib/Future/PP.pm view on Meta::CPAN
$self->{result} = [ map { @{ $_->{result} } } @subs ];
$self->_mark_ready( "needs_all" );
return $self;
}
weaken( my $weakself = $self );
my $sub_on_ready = sub {
return unless my $self = $weakself;
return if $self->{result} or $self->{failure}; # don't recurse on child ->cancel
if( $_[0]->{cancelled} ) {
lib/Future/PP.pm view on Meta::CPAN
$self->{failure} = [ $subs[-1]->{failure} ];
$self->_mark_ready( "needs_any" );
return $self;
}
weaken( my $weakself = $self );
my $sub_on_ready = sub {
return unless my $self = $weakself;
return if $self->{result} or $self->{failure}; # don't recurse on child ->cancel
return if --$pending and $_[0]->{cancelled};
view all matches for this distribution
view release on metacpan or search on metacpan
lib/GCCJIT/Wrapper.pm view on Meta::CPAN
# DO NOT EDIT - this file is autogenerated by tools/regen.pl
package GCCJIT::Wrapper;
use strict;
use warnings;
use Scalar::Util qw/weaken/;
use GCCJIT;
my %stash;
sub gcc_jit_blockPtr::add_assignment {
die "this block is no longer usable because parent context was destroyed"
lib/GCCJIT/Wrapper.pm view on Meta::CPAN
die "this block is no longer usable because parent context was destroyed"
unless defined $stash{"gcc_jit_blockPtr"}{$_[0]};
my $obj = GCCJIT::gcc_jit_block_as_object(@_);
if (defined $obj) {
$stash{"gcc_jit_objectPtr"}{$obj} = $stash{"gcc_jit_blockPtr"}{$_[0]};
weaken $stash{"gcc_jit_objectPtr"}{$obj};
}
$obj;
}
sub gcc_jit_blockPtr::end_with_conditional {
lib/GCCJIT/Wrapper.pm view on Meta::CPAN
die "this block is no longer usable because parent context was destroyed"
unless defined $stash{"gcc_jit_blockPtr"}{$_[0]};
my $obj = GCCJIT::gcc_jit_block_get_function(@_);
if (defined $obj) {
$stash{"gcc_jit_functionPtr"}{$obj} = $stash{"gcc_jit_blockPtr"}{$_[0]};
weaken $stash{"gcc_jit_functionPtr"}{$obj};
}
$obj;
}
sub gcc_jit_casePtr::as_object {
die "this case is no longer usable because parent context was destroyed"
unless defined $stash{"gcc_jit_casePtr"}{$_[0]};
my $obj = GCCJIT::gcc_jit_case_as_object(@_);
if (defined $obj) {
$stash{"gcc_jit_objectPtr"}{$obj} = $stash{"gcc_jit_casePtr"}{$_[0]};
weaken $stash{"gcc_jit_objectPtr"}{$obj};
}
$obj;
}
sub gcc_jit_contextPtr::acquire {
lib/GCCJIT/Wrapper.pm view on Meta::CPAN
sub gcc_jit_contextPtr::get_builtin_function {
my $obj = GCCJIT::gcc_jit_context_get_builtin_function(@_);
if (defined $obj) {
$stash{"gcc_jit_functionPtr"}{$obj} = $_[0];
weaken $stash{"gcc_jit_functionPtr"}{$obj};
}
$obj;
}
*gcc_jit_contextPtr::get_first_error = \&GCCJIT::gcc_jit_context_get_first_error;
sub gcc_jit_contextPtr::get_int_type {
my $obj = GCCJIT::gcc_jit_context_get_int_type(@_);
if (defined $obj) {
$stash{"gcc_jit_typePtr"}{$obj} = $_[0];
weaken $stash{"gcc_jit_typePtr"}{$obj};
}
$obj;
}
*gcc_jit_contextPtr::get_last_error = \&GCCJIT::gcc_jit_context_get_last_error;
sub gcc_jit_contextPtr::get_type {
my $obj = GCCJIT::gcc_jit_context_get_type(@_);
if (defined $obj) {
$stash{"gcc_jit_typePtr"}{$obj} = $_[0];
weaken $stash{"gcc_jit_typePtr"}{$obj};
}
$obj;
}
sub gcc_jit_contextPtr::new_array_access {
my $obj = GCCJIT::gcc_jit_context_new_array_access(@_);
if (defined $obj) {
$stash{"gcc_jit_lvaluePtr"}{$obj} = $_[0];
weaken $stash{"gcc_jit_lvaluePtr"}{$obj};
}
$obj;
}
sub gcc_jit_contextPtr::new_array_type {
my $obj = GCCJIT::gcc_jit_context_new_array_type(@_);
if (defined $obj) {
$stash{"gcc_jit_typePtr"}{$obj} = $_[0];
weaken $stash{"gcc_jit_typePtr"}{$obj};
}
$obj;
}
sub gcc_jit_contextPtr::new_binary_op {
my $obj = GCCJIT::gcc_jit_context_new_binary_op(@_);
if (defined $obj) {
$stash{"gcc_jit_rvaluePtr"}{$obj} = $_[0];
weaken $stash{"gcc_jit_rvaluePtr"}{$obj};
}
$obj;
}
sub gcc_jit_contextPtr::new_call {
my $obj = GCCJIT::gcc_jit_context_new_call(@_);
if (defined $obj) {
$stash{"gcc_jit_rvaluePtr"}{$obj} = $_[0];
weaken $stash{"gcc_jit_rvaluePtr"}{$obj};
}
$obj;
}
sub gcc_jit_contextPtr::new_call_through_ptr {
my $obj = GCCJIT::gcc_jit_context_new_call_through_ptr(@_);
if (defined $obj) {
$stash{"gcc_jit_rvaluePtr"}{$obj} = $_[0];
weaken $stash{"gcc_jit_rvaluePtr"}{$obj};
}
$obj;
}
sub gcc_jit_contextPtr::new_case {
my $obj = GCCJIT::gcc_jit_context_new_case(@_);
if (defined $obj) {
$stash{"gcc_jit_casePtr"}{$obj} = $_[0];
weaken $stash{"gcc_jit_casePtr"}{$obj};
}
$obj;
}
sub gcc_jit_contextPtr::new_cast {
my $obj = GCCJIT::gcc_jit_context_new_cast(@_);
if (defined $obj) {
$stash{"gcc_jit_rvaluePtr"}{$obj} = $_[0];
weaken $stash{"gcc_jit_rvaluePtr"}{$obj};
}
$obj;
}
sub gcc_jit_contextPtr::new_child_context {
lib/GCCJIT/Wrapper.pm view on Meta::CPAN
sub gcc_jit_contextPtr::new_comparison {
my $obj = GCCJIT::gcc_jit_context_new_comparison(@_);
if (defined $obj) {
$stash{"gcc_jit_rvaluePtr"}{$obj} = $_[0];
weaken $stash{"gcc_jit_rvaluePtr"}{$obj};
}
$obj;
}
sub gcc_jit_contextPtr::new_field {
my $obj = GCCJIT::gcc_jit_context_new_field(@_);
if (defined $obj) {
$stash{"gcc_jit_fieldPtr"}{$obj} = $_[0];
weaken $stash{"gcc_jit_fieldPtr"}{$obj};
}
$obj;
}
sub gcc_jit_contextPtr::new_function {
my $obj = GCCJIT::gcc_jit_context_new_function(@_);
if (defined $obj) {
$stash{"gcc_jit_functionPtr"}{$obj} = $_[0];
weaken $stash{"gcc_jit_functionPtr"}{$obj};
}
$obj;
}
sub gcc_jit_contextPtr::new_function_ptr_type {
my $obj = GCCJIT::gcc_jit_context_new_function_ptr_type(@_);
if (defined $obj) {
$stash{"gcc_jit_typePtr"}{$obj} = $_[0];
weaken $stash{"gcc_jit_typePtr"}{$obj};
}
$obj;
}
sub gcc_jit_contextPtr::new_global {
my $obj = GCCJIT::gcc_jit_context_new_global(@_);
if (defined $obj) {
$stash{"gcc_jit_lvaluePtr"}{$obj} = $_[0];
weaken $stash{"gcc_jit_lvaluePtr"}{$obj};
}
$obj;
}
sub gcc_jit_contextPtr::new_location {
my $obj = GCCJIT::gcc_jit_context_new_location(@_);
if (defined $obj) {
$stash{"gcc_jit_locationPtr"}{$obj} = $_[0];
weaken $stash{"gcc_jit_locationPtr"}{$obj};
}
$obj;
}
sub gcc_jit_contextPtr::new_opaque_struct {
my $obj = GCCJIT::gcc_jit_context_new_opaque_struct(@_);
if (defined $obj) {
$stash{"gcc_jit_structPtr"}{$obj} = $_[0];
weaken $stash{"gcc_jit_structPtr"}{$obj};
}
$obj;
}
sub gcc_jit_contextPtr::new_param {
my $obj = GCCJIT::gcc_jit_context_new_param(@_);
if (defined $obj) {
$stash{"gcc_jit_paramPtr"}{$obj} = $_[0];
weaken $stash{"gcc_jit_paramPtr"}{$obj};
}
$obj;
}
sub gcc_jit_contextPtr::new_rvalue_from_double {
my $obj = GCCJIT::gcc_jit_context_new_rvalue_from_double(@_);
if (defined $obj) {
$stash{"gcc_jit_rvaluePtr"}{$obj} = $_[0];
weaken $stash{"gcc_jit_rvaluePtr"}{$obj};
}
$obj;
}
sub gcc_jit_contextPtr::new_rvalue_from_int {
my $obj = GCCJIT::gcc_jit_context_new_rvalue_from_int(@_);
if (defined $obj) {
$stash{"gcc_jit_rvaluePtr"}{$obj} = $_[0];
weaken $stash{"gcc_jit_rvaluePtr"}{$obj};
}
$obj;
}
sub gcc_jit_contextPtr::new_rvalue_from_long {
my $obj = GCCJIT::gcc_jit_context_new_rvalue_from_long(@_);
if (defined $obj) {
$stash{"gcc_jit_rvaluePtr"}{$obj} = $_[0];
weaken $stash{"gcc_jit_rvaluePtr"}{$obj};
}
$obj;
}
sub gcc_jit_contextPtr::new_rvalue_from_ptr {
my $obj = GCCJIT::gcc_jit_context_new_rvalue_from_ptr(@_);
if (defined $obj) {
$stash{"gcc_jit_rvaluePtr"}{$obj} = $_[0];
weaken $stash{"gcc_jit_rvaluePtr"}{$obj};
}
$obj;
}
sub gcc_jit_contextPtr::new_string_literal {
my $obj = GCCJIT::gcc_jit_context_new_string_literal(@_);
if (defined $obj) {
$stash{"gcc_jit_rvaluePtr"}{$obj} = $_[0];
weaken $stash{"gcc_jit_rvaluePtr"}{$obj};
}
$obj;
}
sub gcc_jit_contextPtr::new_struct_type {
my $obj = GCCJIT::gcc_jit_context_new_struct_type(@_);
if (defined $obj) {
$stash{"gcc_jit_structPtr"}{$obj} = $_[0];
weaken $stash{"gcc_jit_structPtr"}{$obj};
}
$obj;
}
sub gcc_jit_contextPtr::new_unary_op {
my $obj = GCCJIT::gcc_jit_context_new_unary_op(@_);
if (defined $obj) {
$stash{"gcc_jit_rvaluePtr"}{$obj} = $_[0];
weaken $stash{"gcc_jit_rvaluePtr"}{$obj};
}
$obj;
}
sub gcc_jit_contextPtr::new_union_type {
my $obj = GCCJIT::gcc_jit_context_new_union_type(@_);
if (defined $obj) {
$stash{"gcc_jit_typePtr"}{$obj} = $_[0];
weaken $stash{"gcc_jit_typePtr"}{$obj};
}
$obj;
}
sub gcc_jit_contextPtr::null {
my $obj = GCCJIT::gcc_jit_context_null(@_);
if (defined $obj) {
$stash{"gcc_jit_rvaluePtr"}{$obj} = $_[0];
weaken $stash{"gcc_jit_rvaluePtr"}{$obj};
}
$obj;
}
sub gcc_jit_contextPtr::one {
my $obj = GCCJIT::gcc_jit_context_one(@_);
if (defined $obj) {
$stash{"gcc_jit_rvaluePtr"}{$obj} = $_[0];
weaken $stash{"gcc_jit_rvaluePtr"}{$obj};
}
$obj;
}
*gcc_jit_contextPtr::set_bool_allow_unreachable_blocks = \&GCCJIT::gcc_jit_context_set_bool_allow_unreachable_blocks;
lib/GCCJIT/Wrapper.pm view on Meta::CPAN
sub gcc_jit_contextPtr::zero {
my $obj = GCCJIT::gcc_jit_context_zero(@_);
if (defined $obj) {
$stash{"gcc_jit_rvaluePtr"}{$obj} = $_[0];
weaken $stash{"gcc_jit_rvaluePtr"}{$obj};
}
$obj;
}
sub gcc_jit_fieldPtr::as_object {
die "this field is no longer usable because parent context was destroyed"
unless defined $stash{"gcc_jit_fieldPtr"}{$_[0]};
my $obj = GCCJIT::gcc_jit_field_as_object(@_);
if (defined $obj) {
$stash{"gcc_jit_objectPtr"}{$obj} = $stash{"gcc_jit_fieldPtr"}{$_[0]};
weaken $stash{"gcc_jit_objectPtr"}{$obj};
}
$obj;
}
sub gcc_jit_functionPtr::as_object {
die "this function is no longer usable because parent context was destroyed"
unless defined $stash{"gcc_jit_functionPtr"}{$_[0]};
my $obj = GCCJIT::gcc_jit_function_as_object(@_);
if (defined $obj) {
$stash{"gcc_jit_objectPtr"}{$obj} = $stash{"gcc_jit_functionPtr"}{$_[0]};
weaken $stash{"gcc_jit_objectPtr"}{$obj};
}
$obj;
}
sub gcc_jit_functionPtr::dump_to_dot {
lib/GCCJIT/Wrapper.pm view on Meta::CPAN
die "this function is no longer usable because parent context was destroyed"
unless defined $stash{"gcc_jit_functionPtr"}{$_[0]};
my $obj = GCCJIT::gcc_jit_function_get_param(@_);
if (defined $obj) {
$stash{"gcc_jit_paramPtr"}{$obj} = $stash{"gcc_jit_functionPtr"}{$_[0]};
weaken $stash{"gcc_jit_paramPtr"}{$obj};
}
$obj;
}
sub gcc_jit_functionPtr::new_block {
die "this function is no longer usable because parent context was destroyed"
unless defined $stash{"gcc_jit_functionPtr"}{$_[0]};
my $obj = GCCJIT::gcc_jit_function_new_block(@_);
if (defined $obj) {
$stash{"gcc_jit_blockPtr"}{$obj} = $stash{"gcc_jit_functionPtr"}{$_[0]};
weaken $stash{"gcc_jit_blockPtr"}{$obj};
}
$obj;
}
sub gcc_jit_functionPtr::new_local {
die "this function is no longer usable because parent context was destroyed"
unless defined $stash{"gcc_jit_functionPtr"}{$_[0]};
my $obj = GCCJIT::gcc_jit_function_new_local(@_);
if (defined $obj) {
$stash{"gcc_jit_lvaluePtr"}{$obj} = $stash{"gcc_jit_functionPtr"}{$_[0]};
weaken $stash{"gcc_jit_lvaluePtr"}{$obj};
}
$obj;
}
sub gcc_jit_locationPtr::as_object {
die "this location is no longer usable because parent context was destroyed"
unless defined $stash{"gcc_jit_locationPtr"}{$_[0]};
my $obj = GCCJIT::gcc_jit_location_as_object(@_);
if (defined $obj) {
$stash{"gcc_jit_objectPtr"}{$obj} = $stash{"gcc_jit_locationPtr"}{$_[0]};
weaken $stash{"gcc_jit_objectPtr"}{$obj};
}
$obj;
}
sub gcc_jit_lvaluePtr::access_field {
die "this lvalue is no longer usable because parent context was destroyed"
unless defined $stash{"gcc_jit_lvaluePtr"}{$_[0]};
my $obj = GCCJIT::gcc_jit_lvalue_access_field(@_);
if (defined $obj) {
$stash{"gcc_jit_lvaluePtr"}{$obj} = $stash{"gcc_jit_lvaluePtr"}{$_[0]};
weaken $stash{"gcc_jit_lvaluePtr"}{$obj};
}
$obj;
}
sub gcc_jit_lvaluePtr::as_object {
die "this lvalue is no longer usable because parent context was destroyed"
unless defined $stash{"gcc_jit_lvaluePtr"}{$_[0]};
my $obj = GCCJIT::gcc_jit_lvalue_as_object(@_);
if (defined $obj) {
$stash{"gcc_jit_objectPtr"}{$obj} = $stash{"gcc_jit_lvaluePtr"}{$_[0]};
weaken $stash{"gcc_jit_objectPtr"}{$obj};
}
$obj;
}
sub gcc_jit_lvaluePtr::as_rvalue {
die "this lvalue is no longer usable because parent context was destroyed"
unless defined $stash{"gcc_jit_lvaluePtr"}{$_[0]};
my $obj = GCCJIT::gcc_jit_lvalue_as_rvalue(@_);
if (defined $obj) {
$stash{"gcc_jit_rvaluePtr"}{$obj} = $stash{"gcc_jit_lvaluePtr"}{$_[0]};
weaken $stash{"gcc_jit_rvaluePtr"}{$obj};
}
$obj;
}
sub gcc_jit_lvaluePtr::get_address {
die "this lvalue is no longer usable because parent context was destroyed"
unless defined $stash{"gcc_jit_lvaluePtr"}{$_[0]};
my $obj = GCCJIT::gcc_jit_lvalue_get_address(@_);
if (defined $obj) {
$stash{"gcc_jit_rvaluePtr"}{$obj} = $stash{"gcc_jit_lvaluePtr"}{$_[0]};
weaken $stash{"gcc_jit_rvaluePtr"}{$obj};
}
$obj;
}
sub gcc_jit_objectPtr::get_context {
lib/GCCJIT/Wrapper.pm view on Meta::CPAN
die "this param is no longer usable because parent context was destroyed"
unless defined $stash{"gcc_jit_paramPtr"}{$_[0]};
my $obj = GCCJIT::gcc_jit_param_as_lvalue(@_);
if (defined $obj) {
$stash{"gcc_jit_lvaluePtr"}{$obj} = $stash{"gcc_jit_paramPtr"}{$_[0]};
weaken $stash{"gcc_jit_lvaluePtr"}{$obj};
}
$obj;
}
sub gcc_jit_paramPtr::as_object {
die "this param is no longer usable because parent context was destroyed"
unless defined $stash{"gcc_jit_paramPtr"}{$_[0]};
my $obj = GCCJIT::gcc_jit_param_as_object(@_);
if (defined $obj) {
$stash{"gcc_jit_objectPtr"}{$obj} = $stash{"gcc_jit_paramPtr"}{$_[0]};
weaken $stash{"gcc_jit_objectPtr"}{$obj};
}
$obj;
}
sub gcc_jit_paramPtr::as_rvalue {
die "this param is no longer usable because parent context was destroyed"
unless defined $stash{"gcc_jit_paramPtr"}{$_[0]};
my $obj = GCCJIT::gcc_jit_param_as_rvalue(@_);
if (defined $obj) {
$stash{"gcc_jit_rvaluePtr"}{$obj} = $stash{"gcc_jit_paramPtr"}{$_[0]};
weaken $stash{"gcc_jit_rvaluePtr"}{$obj};
}
$obj;
}
*gcc_jit_resultPtr::get_code = \&GCCJIT::gcc_jit_result_get_code;
lib/GCCJIT/Wrapper.pm view on Meta::CPAN
die "this rvalue is no longer usable because parent context was destroyed"
unless defined $stash{"gcc_jit_rvaluePtr"}{$_[0]};
my $obj = GCCJIT::gcc_jit_rvalue_access_field(@_);
if (defined $obj) {
$stash{"gcc_jit_rvaluePtr"}{$obj} = $stash{"gcc_jit_rvaluePtr"}{$_[0]};
weaken $stash{"gcc_jit_rvaluePtr"}{$obj};
}
$obj;
}
sub gcc_jit_rvaluePtr::as_object {
die "this rvalue is no longer usable because parent context was destroyed"
unless defined $stash{"gcc_jit_rvaluePtr"}{$_[0]};
my $obj = GCCJIT::gcc_jit_rvalue_as_object(@_);
if (defined $obj) {
$stash{"gcc_jit_objectPtr"}{$obj} = $stash{"gcc_jit_rvaluePtr"}{$_[0]};
weaken $stash{"gcc_jit_objectPtr"}{$obj};
}
$obj;
}
sub gcc_jit_rvaluePtr::dereference {
die "this rvalue is no longer usable because parent context was destroyed"
unless defined $stash{"gcc_jit_rvaluePtr"}{$_[0]};
my $obj = GCCJIT::gcc_jit_rvalue_dereference(@_);
if (defined $obj) {
$stash{"gcc_jit_lvaluePtr"}{$obj} = $stash{"gcc_jit_rvaluePtr"}{$_[0]};
weaken $stash{"gcc_jit_lvaluePtr"}{$obj};
}
$obj;
}
sub gcc_jit_rvaluePtr::dereference_field {
die "this rvalue is no longer usable because parent context was destroyed"
unless defined $stash{"gcc_jit_rvaluePtr"}{$_[0]};
my $obj = GCCJIT::gcc_jit_rvalue_dereference_field(@_);
if (defined $obj) {
$stash{"gcc_jit_lvaluePtr"}{$obj} = $stash{"gcc_jit_rvaluePtr"}{$_[0]};
weaken $stash{"gcc_jit_lvaluePtr"}{$obj};
}
$obj;
}
sub gcc_jit_rvaluePtr::get_type {
die "this rvalue is no longer usable because parent context was destroyed"
unless defined $stash{"gcc_jit_rvaluePtr"}{$_[0]};
my $obj = GCCJIT::gcc_jit_rvalue_get_type(@_);
if (defined $obj) {
$stash{"gcc_jit_typePtr"}{$obj} = $stash{"gcc_jit_rvaluePtr"}{$_[0]};
weaken $stash{"gcc_jit_typePtr"}{$obj};
}
$obj;
}
sub gcc_jit_structPtr::as_type {
die "this struct is no longer usable because parent context was destroyed"
unless defined $stash{"gcc_jit_structPtr"}{$_[0]};
my $obj = GCCJIT::gcc_jit_struct_as_type(@_);
if (defined $obj) {
$stash{"gcc_jit_typePtr"}{$obj} = $stash{"gcc_jit_structPtr"}{$_[0]};
weaken $stash{"gcc_jit_typePtr"}{$obj};
}
$obj;
}
sub gcc_jit_structPtr::set_fields {
lib/GCCJIT/Wrapper.pm view on Meta::CPAN
die "this type is no longer usable because parent context was destroyed"
unless defined $stash{"gcc_jit_typePtr"}{$_[0]};
my $obj = GCCJIT::gcc_jit_type_as_object(@_);
if (defined $obj) {
$stash{"gcc_jit_objectPtr"}{$obj} = $stash{"gcc_jit_typePtr"}{$_[0]};
weaken $stash{"gcc_jit_objectPtr"}{$obj};
}
$obj;
}
sub gcc_jit_typePtr::get_const {
die "this type is no longer usable because parent context was destroyed"
unless defined $stash{"gcc_jit_typePtr"}{$_[0]};
my $obj = GCCJIT::gcc_jit_type_get_const(@_);
if (defined $obj) {
$stash{"gcc_jit_typePtr"}{$obj} = $stash{"gcc_jit_typePtr"}{$_[0]};
weaken $stash{"gcc_jit_typePtr"}{$obj};
}
$obj;
}
sub gcc_jit_typePtr::get_pointer {
die "this type is no longer usable because parent context was destroyed"
unless defined $stash{"gcc_jit_typePtr"}{$_[0]};
my $obj = GCCJIT::gcc_jit_type_get_pointer(@_);
if (defined $obj) {
$stash{"gcc_jit_typePtr"}{$obj} = $stash{"gcc_jit_typePtr"}{$_[0]};
weaken $stash{"gcc_jit_typePtr"}{$obj};
}
$obj;
}
sub gcc_jit_typePtr::get_volatile {
die "this type is no longer usable because parent context was destroyed"
unless defined $stash{"gcc_jit_typePtr"}{$_[0]};
my $obj = GCCJIT::gcc_jit_type_get_volatile(@_);
if (defined $obj) {
$stash{"gcc_jit_typePtr"}{$obj} = $stash{"gcc_jit_typePtr"}{$_[0]};
weaken $stash{"gcc_jit_typePtr"}{$obj};
}
$obj;
}
sub gcc_jit_blockPtr::DESTROY {
view all matches for this distribution