gotta have a plan
[p5sagit/Devel-Declare.git] / t / method.t
index 4e92af6..94868c5 100644 (file)
@@ -91,16 +91,6 @@ use Devel::Declare ();
       shadow(sub (&) { shift });
     }
   }
-
-  sub inject_scope {
-    $^H |= 0x120000;
-    $^H{DD_METHODHANDLERS} = Scope::Guard->new(sub {
-      my $linestr = Devel::Declare::get_linestr;
-      my $offset = Devel::Declare::get_linestr_offset;
-      substr($linestr, $offset, 0) = ';';
-      Devel::Declare::set_linestr($linestr);
-    });
-  }
 }
 
 my ($test_method1, $test_method2, @test_list);
@@ -122,9 +112,7 @@ my ($test_method1, $test_method2, @test_list);
     return bless({ @_ }, $class);
   };
 
-  method foo (
-      $foo
-  ) {
+  method foo ($foo) {
     return (ref $self).': Foo: '.$foo;
   };
 
@@ -150,7 +138,7 @@ my ($test_method1, $test_method2, @test_list);
 
 }
 
-use Test::More 'no_plan';
+use Test::More;
 
 my $o = DeclareTest->new(attr => "value");
 
@@ -173,3 +161,5 @@ is($o->$test_method1('no', 'yes'), 'value, yes', 'anon method with @_ ok');
 is($o->$test_method2('this'), 'DeclareTest2, this', 'anon method with proto ok');
 
 is_deeply([ map { $_->() } @test_list ], [ 1, 2, 3, 4], 'binding ok');
+
+done_testing;