On Wed, Aug 29, 2012 at 2:48 PM, Nicholas Clark <nick@ccl4.org> wrote: > > What happens if we don't change that? ie that junctions are in @_, and > a non-junction aware function is called? In what circumstances do things > go wrong? Anything doing multiple (different) tests, I think: sub close_enough { my ($x, $y, $tolerance) = @_; $x >= $y - $tolerance and $x <= $y + $tolerance } my $x = any(1,10); say "oops" if close_enough $x, 5, 1; # oops ... ... and of course, the Perl6::Junction implementation punts on most kinds of builtin functionality, so just about everything will fail ... use 5.14.0; use strict; use warnings; use Perl6::Junction ':ALL'; my $x = any( blue => green => mauve => ); say $x; say substr($x, 2); say substr($x, any(2)); { no warnings 'once'; *blue = *green = *mauve = sub { say "Dispatched!" } } my $y = main->$x("whoah!"); __END__ Perl6::Junction::Any=ARRAY(0x866fd94) rl6::Junction::Any=ARRAY(0x866fd94) substr outside of string at - line 10. Use of uninitialized value in say at - line 10. Can't locate object method "Any=ARRAY(0x866fd94)" via package "Perl6::Junction" at - line 12. (The last one there must be a bug ... right?) EirikThread Previous | Thread Next