Skip to content

Commit

Permalink
[mm] Implement sub exports
Browse files Browse the repository at this point in the history
  • Loading branch information
sorear committed Sep 19, 2010
1 parent cceef1a commit 8816670
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/Metamodel.pm
Expand Up @@ -472,14 +472,19 @@ sub Op::SubDef::begin {
my $self = shift;
my $body = $self->body->begin;
$opensubs[-1]->add_my_sub($self->var, $body);
$body->strong_used(1) if @{ $self->exports } ||
defined($self->method_too) || defined ($self->proto_too);

if (defined($self->method_too)) {
$body->strong_used(1);
$opensubs[-1]->body_of->add_method($self->method_too, $body);
}

if (defined($self->proto_too)) {
$body->strong_used(1);
$opensubs[-1]->body_of->push_multi_regex($self->proto_too, $body);
}

$opensubs[-1]->add_exports($self->var, $body, $self->exports);

delete $self->{$_} for (qw( body method_too proto_too exports once ));
}

Expand Down

0 comments on commit 8816670

Please sign in to comment.