On Tue, Jan 06, 2009 at 02:50:07AM -0800, Carl Mäsak wrote:
> Due to the structurally recursive nature of C<.perl>, the fact that
> Rakudo r34997 doesn't give newly defined classes a default C<.perl>
> method upon definition is very keenly felt e.g. when doing C<.perl> on
> a list of instances of the new class.
> 
> $ perl6 -e '(class {}).new.perl'Method 'perl' not found for invocant of class 
> ''
> [...]
> $ perl6 -e 'class A {}; A.new.perl'
> Method 'perl' not found for invocant of class 'A'
> [...]
> 
> Two questions naturally arise: the first is why this method isn't
> inherited from Object? The second is what such a default C<.perl>
> should output.

Rakudo doesn't implement a .perl in Object because of the second
question -- we don't know what that default C<.perl> should output.

But if you'd like to add a temporary ".perl" method to Object
that does something more reasonable (however you define it),
that's certainly ok.

In the meantime I'm marking this ticket as a [Spec] ticket.

Pm

Reply via email to