Adapter-Async

 view release on metacpan or  search on metacpan

lib/Adapter/Async.pm  view on Meta::CPAN

=cut

=head2 new

Instantiate, applying any parameters directly to the instance hashref.

=cut

sub new {
	my $class = shift;
	bless { @_ }, $class
}

=head2 bus

Accessor for the L<Adapter::Async::Bus> instance, will create one as
required.

=cut

sub bus { shift->{bus} ||= Adapter::Async::Bus->new }

lib/Adapter/Async/Bus.pm  view on Meta::CPAN

version 0.018

=head1 SYNOPSIS

=head1 DESCRIPTION

=head1 METHODS

=cut

sub new { my $class = shift; bless { @_ }, $class }

=head1 EVENTS

=cut

1;

__END__

=head1 SEE ALSO

lib/Adapter/Async/Model.pm  view on Meta::CPAN

				$self->{$k} = shift;
				return $self
			}
		}

		push @methods, $k => $code;
	}

	push @methods, new =>  sub {
		my ($class) = shift;
		my $self = bless { @_ }, $class;
		$self->init if $self->can('init');
		$self
	};
	push @methods, get_or_create => sub {
		my ($self, $type, $v, $create) = @_;
		return Future->done($v) if ref $v;
		retain_future(
			$self->$type->exists($v)->then(sub {
				return $self->$type->get_key($v) if shift;



( run in 0.649 second using v1.01-cache-2.11-cpan-de7293f3b23 )