Rakudo Perl Hacking Rakudo Perl #79

Where they go

Many methods that we would normally think of as being on List, Str, Int, Hash, etc. actually belong on Any as well.

For example:

my $a = prompt "Enter a value";
say $a.abs;

Q: Where should .abs be defined in order for this to work?

A: Any (not Int or Num)

Copyright © 2009
http://www.pmichaud.com/2009/pres/