Skip to content

Commit

Permalink
dont return the "ref" for Int, Str, ...
Browse files Browse the repository at this point in the history
  • Loading branch information
FROGGS committed Sep 2, 2013
1 parent 68600eb commit 4faaaa6
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lib/Perl5/Terms.pm
Expand Up @@ -139,8 +139,14 @@ multi sub chomp(*@s is rw) is export {
$nr_chomped
}

sub ref($o) is export {
$o.^name.uc
sub ref(\o) is export {
my $name = o ~~ Cool ?? '' !! o.^name.uc;
if $name eq 'SUB' {
'CODE'
}
else {
$name
}
}

sub exists( \a ) is export { a:exists ?? 1 !! '' }
Expand Down

0 comments on commit 4faaaa6

Please sign in to comment.