Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37778552
en ru br
Репозитории ALT

Группа :: Разработка/Perl
Пакет: perl-AnyEvent-BDB

 Главная   Изменения   Спек   Патчи   Исходники   Загрузить   Gear   Bugs and FR  Repocop 

AnyEvent-BDB-1.1/000075500000000000000000000000001147427216600135015ustar00rootroot00000000000000AnyEvent-BDB-1.1/BDB.pm000064400000000000000000000023761147427216600144360ustar00rootroot00000000000000=head1 NAME

AnyEvent::BDB - truly asynchronous berkeley db access

=head1 SYNOPSIS

use AnyEvent::BDB;
use BDB;

# can now use any of the requests your BDB module supports
# as long as you use an event loop supported by AnyEvent.

=head1 DESCRIPTION

This module is an L<AnyEvent> user, you need to make sure that you use and
run a supported event loop.

Loading this module will install the necessary magic to seamlessly
integrate L<BDB> into L<AnyEvent>, i.e. you no longer need to concern
yourself with calling C<BDB::poll_cb> or any of that stuff (you still
can, but this module will do it in case you don't).

The AnyEvent watcher can be disabled by executing C<undef
$AnyEvent::BDB::WATCHER>. Please notify the author of when and why you
think this was necessary.

=cut

package AnyEvent::BDB;

use strict;
no warnings;

use AnyEvent ();
use BDB ();

use base Exporter::;

our $VERSION = '1.1';
our $WATCHER;

my $guard = AnyEvent::post_detect {
$WATCHER = AnyEvent->io (fh => BDB::poll_fileno, poll => 'r', cb => \&BDB::poll_cb);
};
$WATCHER ||= $guard;

BDB::_on_next_submit \&AnyEvent::detect;

=head1 SEE ALSO

L<AnyEvent>, L<Coro::BDB> (for a more natural syntax).

=head1 AUTHOR

Marc Lehmann <schmorp@schmorp.de>
http://home.schmorp.de/

=cut

1

AnyEvent-BDB-1.1/COPYING000064400000000000000000000000761147427216600145370ustar00rootroot00000000000000This module is licensed under the same terms as perl itself.

AnyEvent-BDB-1.1/Changes000064400000000000000000000005551147427216600150010ustar00rootroot00000000000000Revision history for AnyEvent::BDB

1.1 Tue Jul 21 05:24:54 CEST 2009
- when AnyEvent::BDB was loaded after event loop intiialise,
then the watcher would get destroyed again.
- take advantage of AnyEvent 3.81 API and simplify the module
immensely.

1.0 Sat May 10 22:22:01 CEST 2008
- original version, a Net::SNMP::EV-clone.
AnyEvent-BDB-1.1/MANIFEST000064400000000000000000000002161147427216600146310ustar00rootroot00000000000000README
MANIFEST
COPYING
Changes
Makefile.PL
BDB.pm
t/00_load.t
META.yml Module meta-data (added by MakeMaker)
AnyEvent-BDB-1.1/META.yml000064400000000000000000000011401147427216600147460ustar00rootroot00000000000000{
"no_index" : {
"directory" : [
"t",
"inc"
]
},
"meta-spec" : {
"version" : 1.4,
"url" : "http://module-build.sourceforge.net/META-spec-v1.4.html"
},
"generated_by" : "ExtUtils::MakeMaker version 6.50",
"distribution_type" : "module",
"version" : "1.1",
"name" : "AnyEvent-BDB",
"author" : [],
"license" : "unknown",
"build_requires" : {
"ExtUtils::MakeMaker" : 0
},
"requires" : {
"BDB" : 1.5,
"AnyEvent" : 3.81
},
"abstract" : null,
"configure_requires" : {
"ExtUtils::MakeMaker" : 0
}
}
AnyEvent-BDB-1.1/Makefile.PL000064400000000000000000000006161147427216600154560ustar00rootroot00000000000000use ExtUtils::MakeMaker;

my $mm = MM->new({
dist => {
PREOP => 'pod2text BDB.pm | tee README >$(DISTVNAME)/README; chmod -R u=rwX,go=rX . ;',
COMPRESS => 'gzip -9v',
SUFFIX => '.gz',
},
NAME => "AnyEvent::BDB",
VERSION_FROM => "BDB.pm",
PREREQ_PM => {
BDB => 1.5,
AnyEvent => 3.81,
},
});

$mm->flush;

AnyEvent-BDB-1.1/README000064400000000000000000000016601147427216600143640ustar00rootroot00000000000000NAME
AnyEvent::BDB - truly asynchronous berkeley db access

SYNOPSIS
use AnyEvent::BDB;
use BDB;

# can now use any of the requests your BDB module supports
# as long as you use an event loop supported by AnyEvent.

DESCRIPTION
This module is an AnyEvent user, you need to make sure that you use and
run a supported event loop.

Loading this module will install the necessary magic to seamlessly
integrate BDB into AnyEvent, i.e. you no longer need to concern yourself
with calling "BDB::poll_cb" or any of that stuff (you still can, but
this module will do it in case you don't).

The AnyEvent watcher can be disabled by executing "undef
$AnyEvent::BDB::WATCHER". Please notify the author of when and why you
think this was necessary.

SEE ALSO
AnyEvent, Coro::BDB (for a more natural syntax).

AUTHOR
Marc Lehmann <schmorp@schmorp.de>
http://home.schmorp.de/

AnyEvent-BDB-1.1/t/000075500000000000000000000000001147427216600137445ustar00rootroot00000000000000AnyEvent-BDB-1.1/t/00_load.t000064400000000000000000000001731147427216600153500ustar00rootroot00000000000000BEGIN { $| = 1; print "1..1\n"; }
END {print "not ok 1\n" unless $loaded;}
use AnyEvent::BDB;
$loaded = 1;
print "ok 1\n";
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin