Skip to content
Browse files

we are now MRO::Magic

  • Loading branch information...
1 parent 93a7d28 commit 3e890efa2e9222c02d7ee990e5e4bcc5765973a4 @rjbs committed May 18, 2009
Showing with 12 additions and 12 deletions.
  1. +1 −1 lib/{metamethod.pm → MRO/Magic.pm}
  2. +1 −1 t/lib/CLR.pm
  3. +1 −1 t/lib/Class.pm
  4. +1 −1 t/lib/ClassMMN.pm
  5. +1 −1 t/lib/ClassUMS.pm
  6. +1 −1 t/lib/Instance.pm
  7. +5 −5 t/misc-errors.t
  8. +1 −1 t/overloads.t
View
2 lib/metamethod.pm → lib/MRO/Magic.pm
@@ -1,4 +1,4 @@
-package metamethod;
+package MRO::Magic;
use 5.010; # uvar magic does not work prior to version 10
use strict;
use warnings;
View
2 t/lib/CLR.pm
@@ -33,7 +33,7 @@ sub new {
my %STATIC = (new => \&new);
-use metamethod
+use MRO::Magic
passthru => [ qw(import export DESTROY AUTOLOAD) ],
metamethod => sub {
my ($invocant, $method, $args) = @_;
View
2 t/lib/Class.pm
@@ -68,7 +68,7 @@ sub invoke_method {
$code->($invocant, @$args);
}
-use metamethod
+use MRO::Magic
metamethod => \'invoke_method',
passthru => [ qw(VERSION import unimport) ];
View
2 t/lib/ClassMMN.pm
@@ -64,7 +64,7 @@ sub invoke_method {
$code->($invocant, @$args);
};
-use metamethod
+use MRO::Magic
metamethod => \'invoke_method',
metamethod_name => '__M__';
View
2 t/lib/ClassUMS.pm
@@ -39,7 +39,7 @@ my %UNIVERSAL = (
},
);
-use metamethod sub {
+use MRO::Magic sub {
my ($invocant, $method_name, $args) = @_;
my $curr = $invocant;
my $code;
View
2 t/lib/Instance.pm
@@ -50,7 +50,7 @@ sub invoke_method {
$code->($invocant, @$args);
};
-use metamethod
+use MRO::Magic
metamethod => \'invoke_method',
passthru => [ qw(VERSION DESTROY AUTOLOAD import unimport) ];
View
10 t/misc-errors.t
@@ -2,30 +2,30 @@ use strict;
use warnings;
use Test::More 'no_plan';
-use metamethod ();
+use MRO::Magic ();
{
my $ok = eval {
package Foo;
sub __metamethod__ { "just here to cause problems" }
- metamethod->import( sub { 1 } );
+ MRO::Magic->import( sub { 1 } );
1;
};
my $error = $@;
- ok( ! $ok, "we can't use metamethod without custom name if conflict exists");
+ ok( ! $ok, "we can't use MRO::Magic without custom name if conflict exists");
like($error, qr/already/, "... got the right error, more or less");
}
{
my $ok = eval {
package Bar;
- metamethod->import(metamethod => \'doesnt_exist');
+ MRO::Magic->import(metamethod => \'doesnt_exist');
1;
};
my $error = $@;
- ok( ! $ok, "we can't provide metamethod by name if it doesn't exist");
+ ok( ! $ok, "we can't provide MRO::Magic by name if it doesn't exist");
like($error, qr/can't find/, "... got the right error, more or less");
}
View
2 t/overloads.t
@@ -5,7 +5,7 @@ use Test::More 'no_plan';
BEGIN {
package OLP_X; # overloads pass through
- use metamethod
+ use MRO::Magic
passthru => [ 'ISA' ],
overload => {
'@{}' => 'foo',

0 comments on commit 3e890ef

Please sign in to comment.
Something went wrong with that request. Please try again.