Re: More about arrayref/hashref in spectest suite

2008-11-13 Thread TSa
HaloO, Patrick R. Michaud wrote: By way of illustration, contrast the two assignments at the end of the following code: my @x = a b; my @y; @y[1] = @x, 'c'; @y[1,2,3] = @x, 'c'; The second assignment would seem to clearly be a list assignment, leaving @y with (undef, 'a',

More about arrayref/hashref in spectest suite

2008-11-07 Thread Patrick R. Michaud
I'm still working on issues with arrayrefs and hashrefs in the spectest suite. S02-literals/autoref.t:59 has the following: # Implicit referentiation of arrays in assignment to an array element { my @array = a b c; my @other; @other[1] = @array; is [EMAIL

Re: arrayref/hashref in spectest suite

2008-08-21 Thread Thom Boyer
Patrick R. Michaud wrote: my $foo = [ 42 ]; my $bar = { a = 23 }; $foo[1] = $bar; TSa (Thomas Sandlaß) wrote: I would also opt for copy semantics whenever = is used for assignment. But C$foo[1] = $bar *does* use copy semantics. The thing on the right is a reference to a hash, and

Re: arrayref/hashref in spectest suite

2008-08-20 Thread TSa (Thomas Sandlaß)
On Monday, 18. August 2008 20:38:05 Patrick R. Michaud wrote: I would somewhat expect a reference to be instead handled using a statement like $foo[1] := $bar; Comments and clarifications appreciated. I would also opt for copy semantics whenever = is used for assignment. But it seems to

Re: arrayref/hashref in spectest suite

2008-08-20 Thread Larry Wall
On Mon, Aug 18, 2008 at 01:38:05PM -0500, Patrick R. Michaud wrote: : There are quite a few tests in the spectest suite that : make mention of arrayref and hashref, and that expect : things to work like references do in Perl 5. I'd like to : get some confirmation/clarification on them. : :

Re: arrayref/hashref in spectest suite

2008-08-19 Thread Moritz Lenz
Patrick R. Michaud wrote: There are quite a few tests in the spectest suite that make mention of arrayref and hashref, and that expect things to work like references do in Perl 5. I'd like to get some confirmation/clarification on them. Here's one example: my $foo = [ 42 ]; my

arrayref/hashref in spectest suite

2008-08-18 Thread Patrick R. Michaud
There are quite a few tests in the spectest suite that make mention of arrayref and hashref, and that expect things to work like references do in Perl 5. I'd like to get some confirmation/clarification on them. Here's one example: my $foo = [ 42 ]; my $bar = { a = 23 }; $foo[1] =