Skip to content

Commit

Permalink
Improve Routine.perl.
Browse files Browse the repository at this point in the history
  • Loading branch information
jnthn committed Jan 8, 2012
1 parent 8c5258a commit 4e5d8aa
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/core/Routine.pm
Expand Up @@ -35,6 +35,16 @@ my class Routine {
self.dispatcher.defined
}

multi method perl(Routine:D:) {
my $perl = self.^name.lc();
if self.name() -> $n {
$perl ~= " $n";
}
$perl ~= self.signature().perl.substr(1);
$perl ~= ' { ... }';
$perl
}

method wrap(&wrapper) {
my class WrapHandle {
has $!dispatcher;
Expand Down

0 comments on commit 4e5d8aa

Please sign in to comment.