remove redundant constructors from MOP.pm
[gitmo/Class-MOP.git] / t / 031_method_modifiers.t
index 73c915a..8b42875 100644 (file)
@@ -15,7 +15,11 @@ BEGIN {
 {
        my $trace = '';
 
-       my $method = Class::MOP::Method->wrap(sub { $trace .= 'primary' });
+       my $method = Class::MOP::Method->wrap(
+           body         => sub { $trace .= 'primary' },
+           package_name => 'main',
+           name         => '__ANON__',
+       );
        isa_ok($method, 'Class::MOP::Method');
 
        $method->();
@@ -49,7 +53,11 @@ BEGIN {
 
 # test around method
 {
-       my $method = Class::MOP::Method->wrap(sub { 4 });
+       my $method = Class::MOP::Method->wrap(
+           sub { 4 },
+           package_name => 'main',
+           name         => '__ANON__', 
+       );
        isa_ok($method, 'Class::MOP::Method');
        
        is($method->(), 4, '... got the right value from the wrapped method');  
@@ -78,7 +86,11 @@ BEGIN {
 {
        my @tracelog;
        
-       my $method = Class::MOP::Method->wrap(sub { push @tracelog => 'primary' });
+       my $method = Class::MOP::Method->wrap(
+           sub { push @tracelog => 'primary' },
+           package_name => 'main',
+           name         => '__ANON__', 
+       );
        isa_ok($method, 'Class::MOP::Method');
        
        my $wrapped = Class::MOP::Method::Wrapped->wrap($method);