Fwd: CPAN Upload: JPRIT/Event-0.63.tar.gz
[email protected] (Joshua N Pritikin)
| Newsgroups | perl.loop |
|---|---|
| Message-ID | <[email protected]> |
----- Forwarded message from [email protected] ----- Date: Thu, 3 Feb 2000 22:39:39 +0100 Subject: CPAN Upload: JPRIT/Event-0.63.tar.gz From: [email protected] To: [email protected], [email protected] The uploaded file Event-0.63.tar.gz has entered CPAN as file: $CPAN/authors/id/JPRIT/Event-0.63.tar.gz size: 63143 bytes md5: 4c12c5c342dbfb9fea4aaa2cbe15b86f No action is required on your part Request entered by: JPRIT (Joshua N. Pritikin) Request entered on: Thu, 03 Feb 2000 21:38:56 GMT Request completed: Thu, 03 Feb 2000 21:39:39 GMT Virtually Yours, Id: paused,v 1.68 1999/10/22 14:39:12 k Exp k ----- End forwarded message ----- # This is a patch for Event-0.62 to update it to Event-0.63 # # To apply this patch: # STEP 1: Chdir to the source directory. # STEP 2: Run the 'applypatch' program with this patch file as input. # # If you do not have 'applypatch', it is part of the 'makepatch' package # that you can fetch from the Comprehensive Perl Archive Network: # http://www.perl.com/CPAN/authors/Johan_Vromans/makepatch-x.y.tar.gz # In the above URL, 'x' should be 2 or higher. # # To apply this patch without the use of 'applypatch': # STEP 1: Chdir to the source directory. # If you have a decent Bourne-type shell: # STEP 2: Run the shell with this file as input. # If you don't have such a shell, you may need to manually create # the files as shown below. # STEP 3: Run the 'patch' program with this file as input. # # These are the commands needed to create/delete files/directories: # touch 'lib/Event/type.pm' chmod 0444 'lib/Event/type.pm' # # This command terminates the shell and need not be executed manually. exit # #### End of Preamble #### #### Patch data follows #### gdiff -up '/usr/tmp/mp20601.d/old/Event-0.62/ChangeLog' '/usr/tmp/mp20601.d/new/Event-0.63/ChangeLog' Index: ./ChangeLog --- ./ChangeLog Tue Feb 1 12:43:25 2000 +++ ./ChangeLog Thu Feb 3 16:34:07 2000 @@ -1,3 +1,14 @@ +2000-02-03 Joshua Pritikin <[email protected]> + + * Release 0.63. + + * Allow var watchers to watch the same variable. + + * Deprecated AUTOLOAD of Event->$type. (Nick & Graham) + + * Reworked priority documentation based on comments from + [email protected]. + 2000-02-01 Joshua Pritikin <[email protected]> * Release 0.62. ** Please upgrade if you installed 0.61. ** gdiff -up '/usr/tmp/mp20601.d/old/Event-0.62/Event.xs' '/usr/tmp/mp20601.d/new/Event-0.63/Event.xs' Index: ./Event.xs --- ./Event.xs Tue Feb 1 12:19:46 2000 +++ ./Event.xs Wed Feb 2 13:21:15 2000 @@ -35,11 +35,10 @@ static void Event_croak(const char* pat, va_list args; /* perl_require_pv("Carp.pm"); Couldn't possibly be unloaded.*/ va_start(args, pat); - msg = NEWSV(0,0); + msg = sv_newmortal(); sv_vsetpvfn(msg, pat, strlen(pat), &args, Null(SV**), 0, 0); va_end(args); SvREADONLY_on(msg); - SAVEFREESV(msg); PUSHMARK(SP); XPUSHs(msg); PUTBACK; gdiff -up '/usr/tmp/mp20601.d/old/Event-0.62/MANIFEST' '/usr/tmp/mp20601.d/new/Event-0.63/MANIFEST' Index: ./MANIFEST --- ./MANIFEST Mon Jan 31 09:16:05 2000 +++ ./MANIFEST Thu Feb 3 16:36:05 2000 @@ -39,6 +39,7 @@ lib/Event/msg.pm lib/Event/semaphore.pm lib/Event/signal.pm lib/Event/timer.pm +lib/Event/type.pm lib/Event/var.pm ppport.h t/attach_to.t gdiff -up '/usr/tmp/mp20601.d/old/Event-0.62/c/ev.c' '/usr/tmp/mp20601.d/new/Event-0.63/c/ev.c' Index: ./c/ev.c --- ./c/ev.c Wed Dec 22 17:00:05 1999 +++ ./c/ev.c Thu Feb 3 08:48:26 2000 @@ -164,7 +164,6 @@ static void pe_event_postCB(pe_cbframe * static void pe_callback_died(pe_cbframe *fp) { dSP; - dTHX; STRLEN n_a; pe_watcher *wa = fp->ev->up; SV *eval = perl_get_sv("Event::DIED", 1); @@ -275,7 +274,6 @@ static void pe_event_invoke(pe_event *ev SV *cb = SvRV((SV*)ev->callback); int pcflags = G_VOID | (SvIVX(Eval)? G_EVAL : 0); dSP; - dTHX; SV *evsv = event_2sv(ev); if (SvTYPE(cb) == SVt_PVCV) { PUSHMARK(SP); gdiff -up '/usr/tmp/mp20601.d/old/Event-0.62/c/var.c' '/usr/tmp/mp20601.d/new/Event-0.63/c/var.c' Index: ./c/var.c --- ./c/var.c Tue Feb 1 12:29:51 2000 +++ ./c/var.c Thu Feb 3 16:09:09 2000 @@ -69,8 +69,6 @@ static char *pe_var_start(pe_watcher *_e return "cannot trace read-only variable"; if (!SvUPGRADE(sv, SVt_PVMG)) return "SvUPGRADE failed"; - if (mg_find(sv, 'U')) - return "var is already being traced"; mgp = &SvMAGIC(sv); while ((mg = *mgp)) { @@ -110,7 +108,7 @@ static void pe_var_stop(pe_watcher *_ev) mgp = &SvMAGIC(sv); while ((mg = *mgp)) { - if (mg->mg_obj == (SV*)ev) + if (mg->mg_type == 'U' && mg->mg_obj == (SV*)ev) break; mgp = &mg->mg_moremagic; } gdiff -up '/usr/tmp/mp20601.d/old/Event-0.62/demo/in.pl' '/usr/tmp/mp20601.d/new/Event-0.63/demo/in.pl' Index: ./demo/in.pl --- ./demo/in.pl Wed Dec 22 17:00:06 1999 +++ ./demo/in.pl Thu Feb 3 16:19:41 2000 @@ -2,21 +2,24 @@ $| = 1; use Event; +require Event::io; -Event->io(e_fd => \*STDIN, - e_timeout => 5.3, - e_poll => "r", - e_repeat => 1, - e_cb => sub { +Event->io(fd => \*STDIN, + timeout => 2.5, + poll => "r", + repeat => 1, + cb => sub { my $e = shift; - my $got = $e->{e_got}; + my $got = $e->got; #print scalar(localtime), " "; if ($got eq "r") { sysread(STDIN, $buf, 80); chop $buf; - print "read '$buf'\n"; + my $len = length($buf); + Event::unloop if !$len; + print "read[$len]:$buf:\n"; } else { - print "nothing for $e->{e_timeout} seconds\n"; + print "nothing for ".$e->w->timeout." seconds\n"; } }); gdiff -up '/usr/tmp/mp20601.d/old/Event-0.62/demo/variable_repeater.t' '/usr/tmp/mp20601.d/new/Event-0.63/demo/variable_repeater.t' Index: ./demo/variable_repeater.t --- ./demo/variable_repeater.t Wed Dec 22 17:00:07 1999 +++ ./demo/variable_repeater.t Thu Feb 3 16:21:15 2000 @@ -2,6 +2,7 @@ # contributed by [email protected] use Event qw(loop); +require Event::timer; $w = Event->timer(interval => 1); $w->cb(sub { gdiff -up '/usr/tmp/mp20601.d/old/Event-0.62/lib/Event.pm' '/usr/tmp/mp20601.d/new/Event-0.63/lib/Event.pm' Index: ./lib/Event.pm --- ./lib/Event.pm Tue Feb 1 12:43:53 2000 +++ ./lib/Event.pm Thu Feb 3 16:34:16 2000 @@ -13,7 +13,7 @@ use Carp; eval { require Carp::Heavy; }; # work around perl_call_pv bug XXX use vars qw($VERSION @EXPORT_OK $API $DebugLevel $Eval $DIED $Now); -$VERSION = '0.62'; +$VERSION = '0.63'; # If we inherit DynaLoader then we inherit AutoLoader; Bletch! require DynaLoader; @@ -47,7 +47,8 @@ $DIED = \&default_exception_handler; sub _load_watcher { my $sub = shift; - eval { require "Event/$sub.pm" } or return; + eval { require "Event/$sub.pm" }; + die if $@; croak "Event/$sub.pm did not define Event::$sub\::new" unless defined &$sub; 1; @@ -59,6 +60,9 @@ sub _load_watcher { sub AUTOLOAD { my $sub = ($Event::AUTOLOAD =~ /(\w+)$/)[0]; _load_watcher($sub) or croak $@ . ', Undefined subroutine &' . $sub; + carp "Autoloading with Event->$sub(...) is deprecated; +\tplease 'use Event::type qw($sub);' explicitly +\tor 'use Event::type qw(:all)';"; goto &$sub; } gdiff -up '/usr/tmp/mp20601.d/old/Event-0.62/lib/Event.pod' '/usr/tmp/mp20601.d/new/Event-0.63/lib/Event.pod' Index: ./lib/Event.pod --- ./lib/Event.pod Mon Jan 31 11:42:25 2000 +++ ./lib/Event.pod Thu Feb 3 13:54:00 2000 @@ -151,12 +151,20 @@ complete but pending events are cancelle watcher can be reactivated by calling the C<start> or C<again> methods. +Watchers are stopped implicitly if their new configuration deprives +them of the ability to generate events. For instance: + + my $io_watcher = Event->io(timeout => 1); # started + $io_watcher->timeout(undef); # stopped implicitly + $io_watcher->timeout(1); # still stopped + $io_watcher->start; # restarted + =item $watcher->cancel Stop and destroy C<$watcher>. Running events are allowed to complete but pending events are cancelled. Cancelled watchers are no longer -valid except for read-only type operations. For example, prio() will -return the watcher's priority, but start() will always fail. +valid except for read-only type operations. For example, prio() can +return the watcher's priority, but start() will fail. =item $watcher->is_cancelled @@ -251,6 +259,38 @@ Not yet implemented. =back +=head2 PRIORITY + +Priority is used to sort the event queue. Meaningful priorities range +from -1 to 6 inclusive. Lower numbers mean higher priority (-1 is the +highest priority and 6 is the lowest). If multiple events get queued, +the ones with the highest priority are serviced first. + + use Event qw(PRIO_HIGH PRIO_NORMAL); # some constants + + LEVELS: -1 0 1 2 3 4 5 6 + PRIO_HIGH PRIO_NORMAL + +A negative priority causes the callback to be invoked immediately upon +event occurance. Use this with caution. While it may seem +advantageous to use negative priorities, they bypass the whole point +of having an event queue. + +Each watcher has a I<default priority>, assigned by its constructor: + + io PRIO_NORMAL + signal PRIO_HIGH + timer PRIO_NORMAL + var PRIO_NORMAL + +Default priorities are stored in ${"Event::${type}::DefaultPriority"}. +If the default priority is not satisfactory for your purposes, the +constructor options C<nice>, C<async>, or C<prio> can be used to +adjust it. C<nice> specifies an offset from the default priority; +C<async> forces the priority to -1; and C<prio> assigns a given +priority of your choice. If more than one of these options are given +then C<prio> overrides C<async> overrides C<nice>. + =head2 WATCHER CONSTRUCTOR ATTRIBUTES These options are only supported as constructor arguments. @@ -265,10 +305,9 @@ See the discussion of the timer watcher. If $bool then the watcher priority is set to -1. -=item nice => $int +=item nice => $offset -Offset from the default priority. All watchers have a default -priority of ${"Event::${type}::DefaultPriority"}. +Offset from the default priority. =item parked => $yes @@ -372,24 +411,10 @@ Thus, both of these statements enable in A given type of watcher may support all or a subset of the available events. -=item prio => $int - -Priority is used to sort the event queue. Meaningful priorities range -from -1 to 6 inclusive. Lower numbers mean higher priority (-1 is the -highest priority and 6 is the lowest). When multiple events happen, -the events with the highest priority are serviced first. +=item prio => $level -A negative priority indicates that the callback should be invoked -immediately upon event occurance. Use this with caution. While it -may seem advantageous to use negative priorities, they bypass the -whole point of having an event queue. - - ASYNC 0 1 2 3 4 5 6 IDLE - HIGH NORM - -You should not specify prio in the constructor. Use C<nice> instead -for an offset from the default priority. Default priorities are -stored in ${"Event::${type}::DefaultPriority"}. +Changes the watcher's priority to the given level. Events generated +by a watcher usually inherit the priority of the watcher. =item reentrant => $bool @@ -461,12 +486,12 @@ expression of interest. A watcher increments C<hits> every time it registers an event. Signals in quick succession can be clumped into a single event. -=item prio => $int +=item prio => $level -The event's priority. Be aware that this priority can differ from the -watcher's priority since the watcher's priority may have changed since +Be aware that this priority can differ from the watcher's +priority. For instance, the watcher's priority may have changed since the event was generated. Moreover, the C extension API offers the -freedom to queue events of any priority. +freedom to queue events of arbitrary priority. =item w => $watcher gdiff -up '/usr/tmp/mp20601.d/old/Event-0.62/lib/Event/Watcher.pm' '/usr/tmp/mp20601.d/new/Event-0.63/lib/Event/Watcher.pm' Index: ./lib/Event/Watcher.pm --- ./lib/Event/Watcher.pm Wed Jan 26 15:57:36 2000 +++ ./lib/Event/Watcher.pm Thu Feb 3 12:20:03 2000 @@ -49,20 +49,20 @@ sub init { } } - # find e_prio - if (exists $arg->{prio}) { - $o->prio(delete $arg->{prio}) - } elsif ($arg->{async}) { - delete $arg->{async}; - $o->prio(-1); - } else { + # set up prio + { no strict 'refs'; $o->prio($ { ref($o)."::DefaultPriority" } || Event::PRIO_NORMAL); if (exists $arg->{nice}) { $o->prio($o->prio + delete $arg->{nice}); } } + $o->prio(-1) + if delete $arg->{async}; + $o->prio(delete $arg->{prio}) + if exists $arg->{prio}; + # is parked? my $parked = delete $arg->{parked}; for my $k (keys %$arg) { gdiff -up /dev/null '/usr/tmp/mp20601.d/new/Event-0.63/lib/Event/type.pm' Index: ./lib/Event/type.pm --- ./lib/Event/type.pm Wed Dec 31 19:00:00 1969 +++ ./lib/Event/type.pm Thu Feb 3 13:32:03 2000 @@ -0,0 +1,19 @@ +use strict; +package Event::type; + +sub import { + shift; # ignore our package + for my $t (@_) { + if ($t =~ m/^\:/) { + if ($t eq ':all') { + Event::_load_watcher($_) for qw(idle io signal timer var); + } else { + # silently ignore + } + } else { + Event::_load_watcher($t) + } + } +} + +1; gdiff -up '/usr/tmp/mp20601.d/old/Event-0.62/t/attach_to.t' '/usr/tmp/mp20601.d/new/Event-0.63/t/attach_to.t' Index: ./t/attach_to.t --- ./t/attach_to.t Wed Dec 22 17:00:07 1999 +++ ./t/attach_to.t Thu Feb 3 13:36:25 2000 @@ -3,6 +3,7 @@ use strict; use Test; plan tests => 3; use Event 0.53; +use Event::type qw(timer); # $Event::DebugLevel = 3; gdiff -up '/usr/tmp/mp20601.d/old/Event-0.62/t/bored.t' '/usr/tmp/mp20601.d/new/Event-0.63/t/bored.t' Index: ./t/bored.t --- ./t/bored.t Wed Dec 22 17:00:07 1999 +++ ./t/bored.t Thu Feb 3 13:36:50 2000 @@ -1,6 +1,7 @@ # -*- perl -*- use Test; plan test => 4; use Event; +use Event::type qw(timer); # $Event::DebugLevel = 3; gdiff -up '/usr/tmp/mp20601.d/old/Event-0.62/t/callback.t' '/usr/tmp/mp20601.d/new/Event-0.63/t/callback.t' Index: ./t/callback.t --- ./t/callback.t Wed Dec 22 17:00:08 1999 +++ ./t/callback.t Thu Feb 3 13:37:12 2000 @@ -3,6 +3,7 @@ use strict; use Test; plan tests => 3; use Event 0.53; +use Event::type qw(timer); my $invoked_method=0; sub method { gdiff -up '/usr/tmp/mp20601.d/old/Event-0.62/t/delete.t' '/usr/tmp/mp20601.d/new/Event-0.63/t/delete.t' Index: ./t/delete.t --- ./t/delete.t Wed Dec 22 17:00:08 1999 +++ ./t/delete.t Thu Feb 3 13:37:34 2000 @@ -3,6 +3,7 @@ use strict; use Test; plan tests => 1; use Event 0.40 qw(loop unloop); +use Event::type qw(timer); package Foo; gdiff -up '/usr/tmp/mp20601.d/old/Event-0.62/t/eval.t' '/usr/tmp/mp20601.d/new/Event-0.63/t/eval.t' Index: ./t/eval.t --- ./t/eval.t Wed Dec 22 17:00:08 1999 +++ ./t/eval.t Thu Feb 3 13:38:06 2000 @@ -3,6 +3,7 @@ use Carp;# 'verbose'; use Test; plan tests => 7; use Event qw(all_running loop unloop sweep); +use Event::type qw(idle); # $Event::DebugLevel = 3; my $die = Event->idle(cb => sub { die "died\n" }, desc => 'killer'); gdiff -up '/usr/tmp/mp20601.d/old/Event-0.62/t/hook.t' '/usr/tmp/mp20601.d/new/Event-0.63/t/hook.t' Index: ./t/hook.t --- ./t/hook.t Wed Dec 22 17:00:08 1999 +++ ./t/hook.t Thu Feb 3 13:38:28 2000 @@ -3,6 +3,7 @@ use strict; use Test; plan test => 4; use Event qw(sweep sleep); +use Event::type qw(timer); my ($p,$c,$ac,$cb) = (0)x4; gdiff -up '/usr/tmp/mp20601.d/old/Event-0.62/t/hup.t' '/usr/tmp/mp20601.d/new/Event-0.63/t/hup.t' Index: ./t/hup.t --- ./t/hup.t Wed Dec 22 17:00:08 1999 +++ ./t/hup.t Thu Feb 3 13:38:51 2000 @@ -11,6 +11,7 @@ BEGIN { # contributed by Gisle Aas <[email protected]> use Event qw(loop unloop); +use Event::type qw(io); use Test; plan test => 1; $| = 1; gdiff -up '/usr/tmp/mp20601.d/old/Event-0.62/t/idle.t' '/usr/tmp/mp20601.d/new/Event-0.63/t/idle.t' Index: ./t/idle.t --- ./t/idle.t Wed Dec 22 17:00:08 1999 +++ ./t/idle.t Thu Feb 3 13:41:26 2000 @@ -2,6 +2,7 @@ use Test; plan tests => 4; use Event qw(loop unloop); +use Event::type qw(idle); # $Event::Eval = 1; #$Event::DebugLevel = 0; gdiff -up '/usr/tmp/mp20601.d/old/Event-0.62/t/idle2.t' '/usr/tmp/mp20601.d/new/Event-0.63/t/idle2.t' Index: ./t/idle2.t --- ./t/idle2.t Wed Dec 22 17:00:08 1999 +++ ./t/idle2.t Thu Feb 3 13:42:00 2000 @@ -14,6 +14,7 @@ BEGIN { use Test; plan tests => 5; use Event qw(loop unloop time all_events one_event); +require Event::idle; require Event::timer; # $Event::Eval = 1; gdiff -up '/usr/tmp/mp20601.d/old/Event-0.62/t/io.t' '/usr/tmp/mp20601.d/new/Event-0.63/t/io.t' Index: ./t/io.t --- ./t/io.t Wed Dec 22 17:00:08 1999 +++ ./t/io.t Thu Feb 3 13:42:28 2000 @@ -10,6 +10,7 @@ BEGIN { use Test; plan tests => 6; use Event qw(loop unloop); +use Event::type qw(io); use Event::Watcher qw(R W); use Symbol; gdiff -up '/usr/tmp/mp20601.d/old/Event-0.62/t/leak.t' '/usr/tmp/mp20601.d/new/Event-0.63/t/leak.t' Index: ./t/leak.t --- ./t/leak.t Mon Jan 31 11:47:41 2000 +++ ./t/leak.t Thu Feb 3 13:34:03 2000 @@ -1,6 +1,7 @@ # leak -*-perl-*- use Test; plan test => 6; use Event qw(all_watchers); +use Event::type ':all'; my @e = Event::all_watchers(); ok @e, 0; gdiff -up '/usr/tmp/mp20601.d/old/Event-0.62/t/leak2.t' '/usr/tmp/mp20601.d/new/Event-0.63/t/leak2.t' Index: ./t/leak2.t --- ./t/leak2.t Thu Jan 20 10:14:59 2000 +++ ./t/leak2.t Thu Feb 3 13:43:13 2000 @@ -19,6 +19,7 @@ use Test; plan test => 2; use Event; +use Event::type qw(io timer); # $Event::DebugLevel = 3; sub check {warn "[DBG] ", join('-', Event::_memory_counters), "\n";} gdiff -up '/usr/tmp/mp20601.d/old/Event-0.62/t/loop.t' '/usr/tmp/mp20601.d/new/Event-0.63/t/loop.t' Index: ./t/loop.t --- ./t/loop.t Wed Dec 22 17:00:08 1999 +++ ./t/loop.t Thu Feb 3 13:43:36 2000 @@ -3,6 +3,7 @@ use strict; use Test; plan tests => 3; use Event qw(loop unloop); +use Event::type qw(idle timer); # $Event::DebugLevel = 2; gdiff -up '/usr/tmp/mp20601.d/old/Event-0.62/t/now.t' '/usr/tmp/mp20601.d/new/Event-0.63/t/now.t' Index: ./t/now.t --- ./t/now.t Wed Dec 22 17:00:08 1999 +++ ./t/now.t Thu Feb 3 13:43:55 2000 @@ -2,6 +2,7 @@ use Test; plan tests => 3; use Event qw(loop unloop); +use Event::type qw(idle timer); # $Event::DebugLevel = 3; gdiff -up '/usr/tmp/mp20601.d/old/Event-0.62/t/reenter.t' '/usr/tmp/mp20601.d/new/Event-0.63/t/reenter.t' Index: ./t/reenter.t --- ./t/reenter.t Wed Dec 22 17:00:08 1999 +++ ./t/reenter.t Thu Feb 3 13:44:15 2000 @@ -9,6 +9,7 @@ BEGIN { use Test; plan test => 7; use Event qw(loop unloop one_event all_running); +require Event::io; #$Event::DebugLevel = 4; gdiff -up '/usr/tmp/mp20601.d/old/Event-0.62/t/signal.t' '/usr/tmp/mp20601.d/new/Event-0.63/t/signal.t' Index: ./t/signal.t --- ./t/signal.t Wed Dec 22 17:00:08 1999 +++ ./t/signal.t Thu Feb 3 13:44:37 2000 @@ -10,6 +10,7 @@ BEGIN { use Test; plan tests => 4; use Event qw(loop unloop); +use Event::type qw(signal idle); #$Event::DebugLevel = 3; gdiff -up '/usr/tmp/mp20601.d/old/Event-0.62/t/timeout_cb.t' '/usr/tmp/mp20601.d/new/Event-0.63/t/timeout_cb.t' Index: ./t/timeout_cb.t --- ./t/timeout_cb.t Wed Dec 22 17:00:08 1999 +++ ./t/timeout_cb.t Thu Feb 3 13:44:55 2000 @@ -2,6 +2,7 @@ use Test; plan tests => 6; use Event qw(loop); +require Event::io; sub step1 { my ($e) = @_; gdiff -up '/usr/tmp/mp20601.d/old/Event-0.62/t/timer.t' '/usr/tmp/mp20601.d/new/Event-0.63/t/timer.t' Index: ./t/timer.t --- ./t/timer.t Wed Dec 22 17:00:08 1999 +++ ./t/timer.t Thu Feb 3 13:45:13 2000 @@ -2,6 +2,7 @@ use Test; plan tests => 6; use Event qw(loop unloop); +require Event::timer; # $Event::DebugLevel = 4; gdiff -up '/usr/tmp/mp20601.d/old/Event-0.62/t/unconfigured.t' '/usr/tmp/mp20601.d/new/Event-0.63/t/unconfigured.t' Index: ./t/unconfigured.t --- ./t/unconfigured.t Tue Feb 1 12:32:33 2000 +++ ./t/unconfigured.t Thu Feb 3 16:04:16 2000 @@ -1,8 +1,9 @@ #!./perl -w use strict; -use Test; plan test => 8; +use Test; plan test => 7; use Event; +use Event::type ':all'; eval { Event->io }; ok $@, '/unconfigured/'; @@ -26,7 +27,3 @@ ok $@, '/no poll events/'; eval { Event->var(var => \$1) }; ok $@, '/read\-only/'; - -eval { Event->var(var => \$var) for 1..2 }; -ok $@, '/already being traced/'; - gdiff -up '/usr/tmp/mp20601.d/old/Event-0.62/t/var.t' '/usr/tmp/mp20601.d/new/Event-0.63/t/var.t' Index: ./t/var.t --- ./t/var.t Wed Dec 22 17:00:09 1999 +++ ./t/var.t Thu Feb 3 16:12:31 2000 @@ -1,8 +1,9 @@ # watch -*-perl-*- use strict; -use Test; plan test => 5; +use Test; plan test => 6; use Event qw(loop unloop); +use Event::type qw(var idle); # $Event::DebugLevel = 2; @@ -18,6 +19,8 @@ Event->var(var => \$var1, cb => }, desc => "var1" ); + +Event->var(var => \$var1, cb => sub { ok $var1, 2 }); Event->var(var => \$var2, cb => sub { #### End of Patch data #### #### ApplyPatch data follows #### # Data version : 1.0 # Date generated : Thu Feb 3 16:38:08 2000 # Generated by : makepatch 2.00 (2.0BETA) # Recurse directories : Yes # p 'ChangeLog' 21137 949613647 0100444 # p 'Event.xs' 17337 949515675 0100444 # p 'MANIFEST' 827 949613765 0100444 # p 'c/ev.c' 7888 949585706 0100444 # p 'c/var.c' 4125 949612149 0100444 # p 'demo/in.pl' 477 949612781 0100444 # p 'demo/variable_repeater.t' 272 949612875 0100444 # p 'lib/Event.pm' 4159 949613656 0100444 # p 'lib/Event.pod' 20784 949604040 0100444 # p 'lib/Event/Watcher.pm' 2402 949598403 0100444 # c 'lib/Event/type.pm' 0 949602723 0100444 # p 't/attach_to.t' 280 949602985 0100444 # p 't/bored.t' 339 949603010 0100444 # p 't/callback.t' 492 949603032 0100444 # p 't/delete.t' 283 949603054 0100444 # p 't/eval.t' 834 949603086 0100444 # p 't/hook.t' 344 949603108 0100444 # p 't/hup.t' 703 949603131 0100444 # p 't/idle.t' 746 949603286 0100444 # p 't/idle2.t' 1156 949603320 0100444 # p 't/io.t' 1650 949603348 0100444 # p 't/leak.t' 659 949602843 0100444 # p 't/leak2.t' 1062 949603393 0100444 # p 't/loop.t' 644 949603416 0100444 # p 't/now.t' 302 949603435 0100444 # p 't/reenter.t' 894 949603455 0100444 # p 't/signal.t' 549 949603477 0100444 # p 't/timeout_cb.t' 490 949603495 0100444 # p 't/timer.t' 871 949603513 0100444 # p 't/unconfigured.t' 555 949611856 0100444 # p 't/var.t' 745 949612351 0100444 #### End of ApplyPatch data #### #### End of Patch kit [created: Thu Feb 3 16:38:08 2000] #### #### Checksum: 686 22083 34927 #### -- "May the best description of competition prevail." via, but not speaking for Deutsche Bank