use 5.018;
use mop;
class Foo {
method empty_method {}
}
say Foo->new->empty_method;
That prints something like Foo=SCALAR(0x7fe66289f4f0). I need to put an empty return() in the method body to prevent it. For a standard Perl class (or Moose class) a sub with an empty body doesn't return anything.
Ah, this is a regression actually, this was a problem very early on and was fixed, but must have crept back in with the XS-ification work that @doy and @rafl did.
That prints something like
Foo=SCALAR(0x7fe66289f4f0)
. I need to put an emptyreturn()
in the method body to prevent it. For a standard Perl class (or Moose class) a sub with an empty body doesn't return anything.