I've been working on, uh, let's call it a "Perl 6 emulator" recently,
and I've come unstuck about a few things.
I'm sure I'll think of some more questions, but here we go for now:
Should properties interpolate in regular expressions? (and/or strings) I
don't suppose they should, because we don't expect subroutines to.
(if $foo =~ /bar($baz,$quux)/;? Urgh, maybe we need m//e)
What should $foo = (1,2,3) do now? Should it be the same as what
$foo = [1,2,3]; did in Perl 6? (This is assuming that $foo=@INC does what
$foo = \@INC; does now.) Putting it another way: does a list in scalar
context turn into a reference, or is it just arrays that do that? If
so, how can we disambiguate hashes from lists?
Currently I have:
% ./perl -l
printf "This is Perl version %vd\n", $^V;
%foo = (test=>"ok 1", test2=>"ok 3");
print %foo{test};
print "ok 2" if ref ($a=%foo);
print $a->{test2};
print "ok 4" if ref @INC;
print "ok 5" unless ref ($a=(1,2,3))'
This is Perl version 6.0.0
ok 1
ok 2
ok 3
ok 4
ok 5
Does that look right?
--
<dngor> Every little bit of seaweed kelps.