YAPC::EU and Perl 6 Roles

2009-07-07 Thread Ovid
Giving a talk about roles at YAPC::EU in Lisbon and I'm a bit stuck on how to translate a Perl 5 example into Perl 6. Basically, Imagine a "PracticalJoke" class which has fuse() and explode methods(). It needs the timed fuse() from a Bomb role and a non-lethal explode() from a Spouse role, th

Re: YAPC::EU and Perl 6 Roles

2009-07-07 Thread Jon Lang
On Tue, Jul 7, 2009 at 2:48 AM, Ovid wrote: > > Giving a talk about roles at YAPC::EU in Lisbon and I'm a bit stuck on how to > translate a Perl 5 example into Perl 6.  Basically, Imagine a "PracticalJoke" > class which has fuse() and explode methods().  It needs the timed fuse() from > a Bomb r

Re: YAPC::EU and Perl 6 Roles

2009-07-07 Thread Jonathan Worthington
Ovid wrote: Giving a talk about roles at YAPC::EU in Lisbon Hey, me too! :-) and I'm a bit stuck on how to translate a Perl 5 example into Perl 6. Basically, Imagine a "PracticalJoke" class which has fuse() and explode methods(). It needs the timed fuse() from a Bomb role and a non-lethal

Re: YAPC::EU and Perl 6 Roles

2009-07-07 Thread Jonathan Worthington
Jon Lang wrote: I believe that the official word is to say: class PracticalJoke does Bomb does Spouse { method fuse () { Bomb::fuse } method explode () { Spouse::explode } } This way won't work, because: * It's doing a sub call to something that's a method * The lookup won't wor

Re: YAPC::EU and Perl 6 Roles

2009-07-07 Thread Brandon S. Allbery KF8NH
On Jul 7, 2009, at 07:34 , Jonathan Worthington wrote: Jon Lang wrote: I believe that the official word is to say: class PracticalJoke does Bomb does Spouse { method fuse () { Bomb::fuse } method explode () { Spouse::explode } } This way won't work, because: * It's doing a sub call t

Re: YAPC::EU and Perl 6 Roles

2009-07-07 Thread Jonathan Worthington
Brandon S. Allbery KF8NH wrote: On Jul 7, 2009, at 07:34 , Jonathan Worthington wrote: Jon Lang wrote: I believe that the official word is to say: class PracticalJoke does Bomb does Spouse { method fuse () { Bomb::fuse } method explode () { Spouse::explode } } This way won't work, be

Re: YAPC::EU and Perl 6 Roles

2009-07-07 Thread Brandon S. Allbery KF8NH
On Jul 7, 2009, at 08:13 , Jonathan Worthington wrote: Brandon S. Allbery KF8NH wrote: I was trying to figure out how to do it with nextsame, but that's not looking very simple. On the other hand, if they were multis then they get added to the multi candidate list and therefore you can next

Re: YAPC::EU and Perl 6 Roles

2009-07-07 Thread Jonathan Worthington
Brandon S. Allbery KF8NH wrote: On Jul 7, 2009, at 08:13 , Jonathan Worthington wrote: Brandon S. Allbery KF8NH wrote: I was trying to figure out how to do it with nextsame, but that's not looking very simple. On the other hand, if they were multis then they get added to the multi candidate

r27468 - docs/Perl6/Spec/S32-setting-library

2009-07-07 Thread pugs-commits
Author: skids Date: 2009-07-07 15:51:58 +0200 (Tue, 07 Jul 2009) New Revision: 27468 Modified: docs/Perl6/Spec/S32-setting-library/Numeric.pod Log: [S32/Numeric] correct parameter name in atan2 method form Modified: docs/Perl6/Spec/S32-setting-library/Numeric.pod

Testing Perl 6 analog to Perl 5's tie.

2009-07-07 Thread Kyle Hasselbacher
My patchwork readings lead me to believe I could test Perl 6's tie-like feature with something like the below code, which I don't expect to even compile, what with '???' in places. My question is: am I on the right track? Obviously there are details I haven't nailed down, and any guidance would b

Re: YAPC::EU and Perl 6 Roles

2009-07-07 Thread Timothy S. Nelson
On Tue, 7 Jul 2009, Ovid wrote: role Bomb { method fuse (){ say '3 .. 2 .. 1 ..' } method explode () { say 'Rock falls. Everybody dies!' } } role Spouse { method fuse (){ sleep rand(20); say "Now!" } method explode () { say 'You worthless piece of junk! Why I should ...'