naming the test of arrays defined

2013-03-21 Thread Nicholas Clark
I completely agree that there is need for a test of arrays and hashes (and scalars?) of was the optional parameter passed in?. There may be other pertinent uses that I'm not aware of. I think that this sums up my unease about calling the test defined. This is Perl 5: $ ~/test/undefined.pl For

Re: naming the test of arrays defined

2013-03-21 Thread Nicholas Clark
On Thu, Mar 21, 2013 at 04:50:40PM +, Nicholas Clark wrote: Bother. That should have been more to perl6-language than perl6-compiler. Should I resend it? Nicholas Clark

Re: naming the test of arrays defined

2013-03-21 Thread Patrick R. Michaud
On Thu, Mar 21, 2013 at 04:52:16PM +, Nicholas Clark wrote: On Thu, Mar 21, 2013 at 04:50:40PM +, Nicholas Clark wrote: Bother. That should have been more to perl6-language than perl6-compiler. Should I resend it? Either is fine for this; since we're really into a bit of an

Re: naming the test of arrays defined

2013-03-21 Thread Patrick R. Michaud
I don't quite follow the unease from this example, but that's probably because of the way that Perl 6 thinks of undefined being different from Perl 5's undef and defined. In particular: ... sub array { my $what = shift; my $array = []; return $array if $what eq 'undef'; Perl 6

Re: naming the test of arrays defined

2013-03-21 Thread Nicholas Clark
On Thu, Mar 21, 2013 at 12:58:01PM -0500, Patrick R. Michaud wrote: I don't quite follow the unease from this example, but that's probably because of the way that Perl 6 thinks of undefined being different from Perl 5's undef and defined. In particular: ... sub array { my $what