Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

totally hose performance for the sake of working

  • Loading branch information...
commit 93a7d2859e0c6a699190adfb226c665567fcaec3 1 parent 271e730
@rjbs authored
Showing with 3 additions and 14 deletions.
  1. +2 −0  lib/metamethod.pm
  2. +0 −13 t/first-class.t
  3. +1 −1  t/lib/Instance.pm
View
2  lib/metamethod.pm
@@ -96,6 +96,8 @@ sub _gen_fetch_magic {
${ $_[1] } = $_[2];
$_[2] = $metamethod;
+ mro::method_changed_in('UNIVERSAL');
+
return;
};
}
View
13 t/first-class.t
@@ -47,22 +47,9 @@ is($child_class->foo, 'bar', 'foo on ChildClass');
is($parent_class->instance_class, 'Instance', 'ParentClass i_c is Instance');
is($child_class->instance_class, 'Instance', 'ChildClass i_c is Instance');
-diag <<'END_WTF';
-So now we have two class objects. We've tested that they're blessed
-references, and we've tested that their class methods (ping/ping) work as
-expected. Next up, we want to create instances. This is where things fall
-apart. The thing returned by ->new is the instance class, rather than a
-reference blessed into it. What's going on?? -- rjbs, 2009-05-13
-END_WTF
-
-$::extra_debugging = 1;
-
my $parent_instance = $parent_class->new;
-diag ">> class: $parent_class // instance $parent_instance <<";
is(ref $parent_instance, 'Instance', 'check ref of ParentInstance');
-__END__
-
my $child_instance = $child_class->new;
is(ref $child_instance, 'Instance', 'check ref of ChildInstance');
View
2  t/lib/Instance.pm
@@ -52,7 +52,7 @@ sub invoke_method {
use metamethod
metamethod => \'invoke_method',
- passthru => [ qw(VERSION import unimport) ];
+ passthru => [ qw(VERSION DESTROY AUTOLOAD import unimport) ];
{ package Instance; use mro 'InstanceX'; }
Please sign in to comment.
Something went wrong with that request. Please try again.