r43717 - in /branches/upstream/libobject-event-perl/current: ./ lib/Object/ samples/ t/

jawnsy-guest at users.alioth.debian.org jawnsy-guest at users.alioth.debian.org
Sat Sep 5 01:00:59 UTC 2009


Author: jawnsy-guest
Date: Sat Sep  5 01:00:14 2009
New Revision: 43717

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=43717
Log:
[svn-upgrade] Integrating new upstream version, libobject-event-perl (1.101)

Added:
    branches/upstream/libobject-event-perl/current/t/16_event.t
Modified:
    branches/upstream/libobject-event-perl/current/Changes
    branches/upstream/libobject-event-perl/current/MANIFEST
    branches/upstream/libobject-event-perl/current/META.yml
    branches/upstream/libobject-event-perl/current/Makefile.PL
    branches/upstream/libobject-event-perl/current/README
    branches/upstream/libobject-event-perl/current/lib/Object/Event.pm
    branches/upstream/libobject-event-perl/current/samples/benchmark
    branches/upstream/libobject-event-perl/current/t/01_simple_events.t
    branches/upstream/libobject-event-perl/current/t/02_stop_event.t
    branches/upstream/libobject-event-perl/current/t/03_event_within.t
    branches/upstream/libobject-event-perl/current/t/04_recursive.t
    branches/upstream/libobject-event-perl/current/t/05_unreg_rec.t
    branches/upstream/libobject-event-perl/current/t/06_unreg_guard.t
    branches/upstream/libobject-event-perl/current/t/07_event_name.t
    branches/upstream/libobject-event-perl/current/t/08_priorities.t
    branches/upstream/libobject-event-perl/current/t/10_continue.t
    branches/upstream/libobject-event-perl/current/t/12_prio.t
    branches/upstream/libobject-event-perl/current/t/13_methods.t
    branches/upstream/libobject-event-perl/current/t/14_methods2.t
    branches/upstream/libobject-event-perl/current/t/15_methods_subc.t

Modified: branches/upstream/libobject-event-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libobject-event-perl/current/Changes?rev=43717&op=diff
==============================================================================
--- branches/upstream/libobject-event-perl/current/Changes (original)
+++ branches/upstream/libobject-event-perl/current/Changes Sat Sep  5 01:00:14 2009
@@ -1,4 +1,9 @@
 Revision history for Object-Event:
+
+1.101   Fri Sep  4 14:24:58 CEST 2009
+        - fixed stupid bug in event method, returning always false
+          (added test for that now).
+        - using common::sense now.
 
 1.1     Sun Aug  9 18:05:08 CEST 2009
         - fixed some really wrong documentation (i.e.: about return values of

Modified: branches/upstream/libobject-event-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libobject-event-perl/current/MANIFEST?rev=43717&op=diff
==============================================================================
--- branches/upstream/libobject-event-perl/current/MANIFEST (original)
+++ branches/upstream/libobject-event-perl/current/MANIFEST Sat Sep  5 01:00:14 2009
@@ -17,6 +17,7 @@
 t/13_methods.t
 t/14_methods2.t
 t/15_methods_subc.t
+t/16_event.t
 samples/simple_example
 samples/benchmark
 samples/mass_example

Modified: branches/upstream/libobject-event-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libobject-event-perl/current/META.yml?rev=43717&op=diff
==============================================================================
--- branches/upstream/libobject-event-perl/current/META.yml (original)
+++ branches/upstream/libobject-event-perl/current/META.yml Sat Sep  5 01:00:14 2009
@@ -1,6 +1,6 @@
 --- #YAML:1.0
 name:               Object-Event
-version:            1.1
+version:            1.101
 abstract:           A class that provides an event callback interface
 author:
     - Robin Redeker <elmex at x-paste.de>
@@ -8,14 +8,17 @@
 distribution_type:  module
 configure_requires:
     ExtUtils::MakeMaker:  0
+build_requires:
+    ExtUtils::MakeMaker:  0
 requires:
-    AnyEvent:    3.5
-    Test::More:  0
+    AnyEvent:       3.5
+    common::sense:  0
+    Test::More:     0
 no_index:
     directory:
         - t
         - inc
-generated_by:       ExtUtils::MakeMaker version 6.46
+generated_by:       ExtUtils::MakeMaker version 6.55_02
 meta-spec:
     url:      http://module-build.sourceforge.net/META-spec-v1.4.html
     version:  1.4

Modified: branches/upstream/libobject-event-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libobject-event-perl/current/Makefile.PL?rev=43717&op=diff
==============================================================================
--- branches/upstream/libobject-event-perl/current/Makefile.PL (original)
+++ branches/upstream/libobject-event-perl/current/Makefile.PL Sat Sep  5 01:00:14 2009
@@ -11,8 +11,9 @@
     PL_FILES            => {},
     test                => { TESTS => "t/*.t t/methds/*.t" },
     PREREQ_PM => {
-        'Test::More'   => 0,
-        'AnyEvent'     => 3.5,
+        'Test::More'    => 0,
+        'AnyEvent'      => 3.5,
+        'common::sense' => 0,
     },
     dist                => {
        COMPRESS => 'gzip -9f',

Modified: branches/upstream/libobject-event-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libobject-event-perl/current/README?rev=43717&op=diff
==============================================================================
--- branches/upstream/libobject-event-perl/current/README (original)
+++ branches/upstream/libobject-event-perl/current/README Sat Sep  5 01:00:14 2009
@@ -2,7 +2,7 @@
     Object::Event - A class that provides an event callback interface
 
 VERSION
-    Version 1.1
+    Version 1.101
 
 SYNOPSIS
        package foo;

Modified: branches/upstream/libobject-event-perl/current/lib/Object/Event.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libobject-event-perl/current/lib/Object/Event.pm?rev=43717&op=diff
==============================================================================
--- branches/upstream/libobject-event-perl/current/lib/Object/Event.pm (original)
+++ branches/upstream/libobject-event-perl/current/lib/Object/Event.pm Sat Sep  5 01:00:14 2009
@@ -1,6 +1,5 @@
 package Object::Event;
-use strict;
-no warnings;
+use common::sense;
 use Carp qw/croak/;
 use AnyEvent::Util qw/guard/;
 
@@ -12,11 +11,11 @@
 
 =head1 VERSION
 
-Version 1.1
-
-=cut
-
-our $VERSION = '1.1';
+Version 1.101
+
+=cut
+
+our $VERSION = '1.101';
 
 =head1 SYNOPSIS
 
@@ -159,7 +158,6 @@
    }
 
    if ($self->{enable_methods}) {
-      no strict 'refs';
       my $class = ref $self;
       for my $ev (keys %{"$class\::__OE_INHERITED_METHODS"}) {
          $self->_check_method ($ev)
@@ -342,8 +340,6 @@
 sub _check_method {
    my ($self, $ev) = @_;
    my $pkg = ref ($self);
-
-   no strict 'refs';
 
    my $add = 0;
    my $repl = 0;
@@ -445,6 +441,8 @@
    # Legacy code end
    ######################
 
+   return unless @cbs;
+
    local $self->{__oe_cbs} = [\@cbs, \@arg, $ev];
    eval {
       $cbs[0]->[2]->($self, @arg), shift @cbs while @cbs;
@@ -461,7 +459,7 @@
       }
    }
 
-   @cbs > 0
+   1 # handlers ran
 }
 
 =item my $bool = $obj->handles ($eventname)
@@ -621,8 +619,6 @@
 sub hand_event_methods_down {
    my ($pkg, @evs) = @_;
 
-   no strict 'refs';
-
    for my $ev (@evs) {
       for my $meth (@{${"$pkg\::__OE_INHERITED_METHODS"}{$ev} || []}) {
          push @{${"$pkg\::__OE_HANDED_METHODS"}{$ev}}, $meth;
@@ -649,7 +645,6 @@
 sub hand_event_methods_down_from {
    my ($pkg, @pkgs) = @_;
 
-   no strict 'refs';
    $pkg->hand_event_methods_down (keys %{"$pkg\::__OE_INHERITED_METHODS"});
 }
 
@@ -666,8 +661,6 @@
 
 sub inherit_event_methods_from {
    my ($pkg, @suppkgs) = @_;
-
-   no strict 'refs';
 
    for my $suppkg (@suppkgs) {
       for my $ev (keys %{"$suppkg\::__OE_HANDED_METHODS"}) {

Modified: branches/upstream/libobject-event-perl/current/samples/benchmark
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libobject-event-perl/current/samples/benchmark?rev=43717&op=diff
==============================================================================
--- branches/upstream/libobject-event-perl/current/samples/benchmark (original)
+++ branches/upstream/libobject-event-perl/current/samples/benchmark Sat Sep  5 01:00:14 2009
@@ -1,8 +1,7 @@
 #!perl
 
 package foo;
-use strict;
-no warnings;
+use common::sense;
 
 use base qw/Object::Event/;
 
@@ -16,8 +15,7 @@
 sub test { $cnt++ }
 
 package main;
-use strict;
-no warnings;
+use common::sense;
 
 use Benchmark qw/:all/;
 

Modified: branches/upstream/libobject-event-perl/current/t/01_simple_events.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libobject-event-perl/current/t/01_simple_events.t?rev=43717&op=diff
==============================================================================
--- branches/upstream/libobject-event-perl/current/t/01_simple_events.t (original)
+++ branches/upstream/libobject-event-perl/current/t/01_simple_events.t Sat Sep  5 01:00:14 2009
@@ -3,8 +3,7 @@
 use Test::More tests => 10;
 
 package foo;
-use strict;
-no warnings;
+use common::sense;
 
 use Object::Event;
 $Object::Event::ENABLE_METHODS_DEFAULT = $ENV{OE_METHODS_ENABLE};
@@ -12,8 +11,7 @@
 our @ISA = qw/Object::Event/;
 
 package main;
-use strict;
-no warnings;
+use common::sense;
 
 my $f = foo->new;
 

Modified: branches/upstream/libobject-event-perl/current/t/02_stop_event.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libobject-event-perl/current/t/02_stop_event.t?rev=43717&op=diff
==============================================================================
--- branches/upstream/libobject-event-perl/current/t/02_stop_event.t (original)
+++ branches/upstream/libobject-event-perl/current/t/02_stop_event.t Sat Sep  5 01:00:14 2009
@@ -3,8 +3,7 @@
 use Test::More tests => 25;
 
 package foo;
-use strict;
-no warnings;
+use common::sense;
 
 use Object::Event;
 $Object::Event::ENABLE_METHODS_DEFAULT = $ENV{OE_METHODS_ENABLE};
@@ -12,8 +11,7 @@
 our @ISA = qw/Object::Event/;
 
 package main;
-use strict;
-no warnings;
+use common::sense;
 
 my $f = foo->new;
 

Modified: branches/upstream/libobject-event-perl/current/t/03_event_within.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libobject-event-perl/current/t/03_event_within.t?rev=43717&op=diff
==============================================================================
--- branches/upstream/libobject-event-perl/current/t/03_event_within.t (original)
+++ branches/upstream/libobject-event-perl/current/t/03_event_within.t Sat Sep  5 01:00:14 2009
@@ -3,8 +3,7 @@
 use Test::More tests => 2;
 
 package foo;
-use strict;
-no warnings;
+use common::sense;
 
 use Object::Event;
 $Object::Event::ENABLE_METHODS_DEFAULT = $ENV{OE_METHODS_ENABLE};
@@ -12,8 +11,7 @@
 our @ISA = qw/Object::Event/;
 
 package main;
-use strict;
-no warnings;
+use common::sense;
 
 my $f = foo->new;
 

Modified: branches/upstream/libobject-event-perl/current/t/04_recursive.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libobject-event-perl/current/t/04_recursive.t?rev=43717&op=diff
==============================================================================
--- branches/upstream/libobject-event-perl/current/t/04_recursive.t (original)
+++ branches/upstream/libobject-event-perl/current/t/04_recursive.t Sat Sep  5 01:00:14 2009
@@ -3,8 +3,7 @@
 use Test::More tests => 1;
 
 package foo;
-use strict;
-no warnings;
+use common::sense;
 
 use Object::Event;
 $Object::Event::ENABLE_METHODS_DEFAULT = $ENV{OE_METHODS_ENABLE};
@@ -12,8 +11,7 @@
 our @ISA = qw/Object::Event/;
 
 package main;
-use strict;
-no warnings;
+use common::sense;
 
 my $f = foo->new;
 

Modified: branches/upstream/libobject-event-perl/current/t/05_unreg_rec.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libobject-event-perl/current/t/05_unreg_rec.t?rev=43717&op=diff
==============================================================================
--- branches/upstream/libobject-event-perl/current/t/05_unreg_rec.t (original)
+++ branches/upstream/libobject-event-perl/current/t/05_unreg_rec.t Sat Sep  5 01:00:14 2009
@@ -3,8 +3,7 @@
 use Test::More tests => 6;
 
 package foo;
-use strict;
-no warnings;
+use common::sense;
 
 use Object::Event;
 $Object::Event::ENABLE_METHODS_DEFAULT = $ENV{OE_METHODS_ENABLE};
@@ -12,8 +11,7 @@
 our @ISA = qw/Object::Event/;
 
 package main;
-use strict;
-no warnings;
+use common::sense;
 
 my $f = foo->new;
 

Modified: branches/upstream/libobject-event-perl/current/t/06_unreg_guard.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libobject-event-perl/current/t/06_unreg_guard.t?rev=43717&op=diff
==============================================================================
--- branches/upstream/libobject-event-perl/current/t/06_unreg_guard.t (original)
+++ branches/upstream/libobject-event-perl/current/t/06_unreg_guard.t Sat Sep  5 01:00:14 2009
@@ -3,8 +3,7 @@
 use Test::More tests => 4;
 
 package foo;
-use strict;
-no warnings;
+use common::sense;
 
 use Object::Event;
 $Object::Event::ENABLE_METHODS_DEFAULT = $ENV{OE_METHODS_ENABLE};
@@ -12,8 +11,7 @@
 our @ISA = qw/Object::Event/;
 
 package main;
-use strict;
-no warnings;
+use common::sense;
 
 my $f = foo->new;
 

Modified: branches/upstream/libobject-event-perl/current/t/07_event_name.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libobject-event-perl/current/t/07_event_name.t?rev=43717&op=diff
==============================================================================
--- branches/upstream/libobject-event-perl/current/t/07_event_name.t (original)
+++ branches/upstream/libobject-event-perl/current/t/07_event_name.t Sat Sep  5 01:00:14 2009
@@ -3,8 +3,7 @@
 use Test::More tests => 1;
 
 package foo;
-use strict;
-no warnings;
+use common::sense;
 
 use Object::Event;
 $Object::Event::ENABLE_METHODS_DEFAULT = $ENV{OE_METHODS_ENABLE};
@@ -12,8 +11,7 @@
 our @ISA = qw/Object::Event/;
 
 package main;
-use strict;
-no warnings;
+use common::sense;
 
 my $f = foo->new;
 

Modified: branches/upstream/libobject-event-perl/current/t/08_priorities.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libobject-event-perl/current/t/08_priorities.t?rev=43717&op=diff
==============================================================================
--- branches/upstream/libobject-event-perl/current/t/08_priorities.t (original)
+++ branches/upstream/libobject-event-perl/current/t/08_priorities.t Sat Sep  5 01:00:14 2009
@@ -3,8 +3,7 @@
 use Test::More tests => 4;
 
 package foo;
-use strict;
-no warnings;
+use common::sense;
 
 use Object::Event;
 $Object::Event::ENABLE_METHODS_DEFAULT = $ENV{OE_METHODS_ENABLE};
@@ -12,8 +11,7 @@
 our @ISA = qw/Object::Event/;
 
 package main;
-use strict;
-no warnings;
+use common::sense;
 
 my $f = foo->new;
 

Modified: branches/upstream/libobject-event-perl/current/t/10_continue.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libobject-event-perl/current/t/10_continue.t?rev=43717&op=diff
==============================================================================
--- branches/upstream/libobject-event-perl/current/t/10_continue.t (original)
+++ branches/upstream/libobject-event-perl/current/t/10_continue.t Sat Sep  5 01:00:14 2009
@@ -3,8 +3,7 @@
 use Test::More tests => 2;
 
 package foo;
-use strict;
-no warnings;
+use common::sense;
 
 use base qw/Object::Event/;
 $Object::Event::ENABLE_METHODS_DEFAULT = $ENV{OE_METHODS_ENABLE};
@@ -12,8 +11,7 @@
 sub test { }
 
 package main;
-use strict;
-no warnings;
+use common::sense;
 
 my $f = foo->new;
 

Modified: branches/upstream/libobject-event-perl/current/t/12_prio.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libobject-event-perl/current/t/12_prio.t?rev=43717&op=diff
==============================================================================
--- branches/upstream/libobject-event-perl/current/t/12_prio.t (original)
+++ branches/upstream/libobject-event-perl/current/t/12_prio.t Sat Sep  5 01:00:14 2009
@@ -3,8 +3,7 @@
 use Test::More tests => 1;
 
 package foo;
-use strict;
-no warnings;
+use common::sense;
 
 use Object::Event;
 $Object::Event::ENABLE_METHODS_DEFAULT = $ENV{OE_METHODS_ENABLE};
@@ -12,11 +11,9 @@
 our @ISA = qw/Object::Event/;
 
 package main;
-use strict;
-no warnings;
+use common::sense;
 
 # obfuscation around update_test
-no strict 'refs';
 my $oe = 'Object' . '::' . 'Event';
 &{$oe. '::' . 'register_priority_alias'} ('first', 3000);
 &{$oe. '::' . 'register_priority_alias'} ('last', -3000);

Modified: branches/upstream/libobject-event-perl/current/t/13_methods.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libobject-event-perl/current/t/13_methods.t?rev=43717&op=diff
==============================================================================
--- branches/upstream/libobject-event-perl/current/t/13_methods.t (original)
+++ branches/upstream/libobject-event-perl/current/t/13_methods.t Sat Sep  5 01:00:14 2009
@@ -1,10 +1,9 @@
 #!perl
 
-use Test::More tests => 6;
+use Test::More tests => 7;
 
 package foo;
-use strict;
-no warnings;
+use common::sense;
 
 use base qw/Object::Event/;
 
@@ -14,8 +13,7 @@
 }
 
 package main;
-use strict;
-no warnings;
+use common::sense;
 
 my $f  = foo->new (enable_methods => 1);
 my $f2 = foo->new (enable_methods => 1);
@@ -36,3 +34,5 @@
 $f2->foobar;
 is ($f->{b}, 10, 'first object got method with event callback');
 is ($f2->{b}, undef, 'second object doesn\'t have method with event callback');
+
+ok ($f->event ('test'), 'event returns true for methods');

Modified: branches/upstream/libobject-event-perl/current/t/14_methods2.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libobject-event-perl/current/t/14_methods2.t?rev=43717&op=diff
==============================================================================
--- branches/upstream/libobject-event-perl/current/t/14_methods2.t (original)
+++ branches/upstream/libobject-event-perl/current/t/14_methods2.t Sat Sep  5 01:00:14 2009
@@ -3,8 +3,7 @@
 use Test::More tests => 5;
 
 package foo;
-use strict;
-no warnings;
+use common::sense;
 
 use base qw/Object::Event/;
 
@@ -16,8 +15,7 @@
 sub reset { (shift)->{res} = 0 }
 
 package main;
-use strict;
-no warnings;
+use common::sense;
 
 my $f = foo->new (enable_methods => 1);
 

Modified: branches/upstream/libobject-event-perl/current/t/15_methods_subc.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libobject-event-perl/current/t/15_methods_subc.t?rev=43717&op=diff
==============================================================================
--- branches/upstream/libobject-event-perl/current/t/15_methods_subc.t (original)
+++ branches/upstream/libobject-event-perl/current/t/15_methods_subc.t Sat Sep  5 01:00:14 2009
@@ -3,8 +3,7 @@
 use Test::More tests => 5;
 
 package first;
-use strict;
-no warnings;
+use common::sense;
 
 use base qw/Object::Event/;
 
@@ -21,8 +20,7 @@
 }
 
 package pre;
-use strict;
-no warnings;
+use common::sense;
 
 use base qw/first/;
 
@@ -35,8 +33,7 @@
 }
 
 package foo;
-use strict;
-no warnings;
+use common::sense;
 
 use base qw/Object::Event/;
 
@@ -46,8 +43,7 @@
 }
 
 package bar;
-use strict;
-no warnings;
+use common::sense;
 
 use base qw/foo pre/;
 
@@ -64,8 +60,7 @@
 }
 
 package main;
-use strict;
-no warnings;
+use common::sense;
 
 my $f = foo->new (enable_methods => 1);
 my $b = bar->new (enable_methods => 1);

Added: branches/upstream/libobject-event-perl/current/t/16_event.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libobject-event-perl/current/t/16_event.t?rev=43717&op=file
==============================================================================
--- branches/upstream/libobject-event-perl/current/t/16_event.t (added)
+++ branches/upstream/libobject-event-perl/current/t/16_event.t Sat Sep  5 01:00:14 2009
@@ -1,0 +1,21 @@
+#!perl
+
+use Test::More tests => 2;
+
+package foo;
+use common::sense;
+
+use Object::Event;
+$Object::Event::ENABLE_METHODS_DEFAULT = $ENV{OE_METHODS_ENABLE};
+
+our @ISA = qw/Object::Event/;
+
+package main;
+use common::sense;
+
+my $f = foo->new;
+
+$f->reg_cb (test1 => sub { });
+
+ok ($f->event ('test1'),  "event returns true for reg_cb cb.");
+ok (!$f->event ('test2'), "event returns false for non cb.");




More information about the Pkg-perl-cvs-commits mailing list