From a63b5c53eb7774c60c68c27ea6f80de6386f96ff Mon Sep 17 00:00:00 2001 From: Jonathan Worthington Date: Fri, 16 Jul 2010 23:41:36 +0200 Subject: [PATCH] Remove a workaround and some other tweaks to avoid a meta-error in reporting failed dispatches to trait_mod multis. --- src/core/Signature.pm | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/core/Signature.pm b/src/core/Signature.pm index 8143bb57324..9d38dd64bb2 100644 --- a/src/core/Signature.pm +++ b/src/core/Signature.pm @@ -39,28 +39,25 @@ augment class Signature { # First the type. my $name = $param.name; - # work around TT #1560 - $name = '' unless chars($name); - if !$param.slurpy { - my $sigil = substr($name, 0, 1); + my $sigil = $name.substr(0, 1); my $perl = $param.type.perl; if $sigil eq '$' { take $perl ~ ' '; } elsif $sigil eq '@' { if $perl ne 'Positional' { - take substr($perl, 11, $perl.chars - 12) ~ ' '; + take $perl.substr(11, $perl.chars - 12) ~ ' '; } } elsif $sigil eq '%' { if $perl ne 'Associative' { - take substr($perl, 12, $perl.chars - 13) ~ ' '; + take $perl.substr(12, $perl.chars - 13) ~ ' '; } } - elsif substr($perl, 0, 8) eq 'Callable' { + elsif $perl.substr(0, 8) eq 'Callable' { if $perl ne 'Callable' { - take substr($perl, 9, $perl.chars - 10) ~ ' '; + take $perl.substr(9, $perl.chars - 10) ~ ' '; } } else { @@ -96,7 +93,7 @@ augment class Signature { # Any sub-signature? if $param.signature { - take ' ' ~ substr($param.signature.perl, 1); + take ' ' ~ $param.signature.perl.substr(1); } # Default.