stevan / p5-mop-redux

A(nother) MOP for Perl 5
139 stars 36 forks source link

the current hack to emulate lexical exporting has edge cases #100

Open doy opened 11 years ago

doy commented 11 years ago

Given this situation:

# Foo/Bar/Baz.pm
package Foo::Bar;
use mop;
class Baz extends Foo::Bar { }
no mop;
# Foo/Bar.pm
package Foo;
use mop;
class Bar {
    method class { ... }
}
no mop;
# script.pl
use Foo::Bar::Baz;

what currently happens is:

This could be worked around once we rewrite the parser in XS (#93) by giving the keywords a call checker that optimizes out the entersub op, but hopefully we can get lexical exports (#99) working before that's necessary.