Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
require now searches for exported symbols instead of our-scoped symbols
  • Loading branch information
moritz committed Jun 10, 2012
1 parent 200af35 commit d96f5ee
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/core/operators.pm
Expand Up @@ -270,6 +270,11 @@ sub INDIRECT_NAME_LOOKUP($root, *@chunks) is rw {

sub REQUIRE_IMPORT($package-name, *@syms) {
my $package := CALLER::OUR::{$package-name}.WHO;
unless $package.exists('EXPORT') {
die "Trying to import symbols @syms.join(', ') from '$package-name', but it does not export anything";
}
$package := $package<EXPORT>.WHO<ALL>.WHO;
say $package.keys;
my @missing;
for @syms {
unless $package.exists($_) {
Expand Down

0 comments on commit d96f5ee

Please sign in to comment.