HaloO,
Patrick R. Michaud wrote:
By way of illustration, contrast the two assignments at
the end of the following code:
my @x = ;
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', 'b', 'c
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 = ;
my @other;
@other[1] = @array;
is [EMAIL PROTECTED],
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, a
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.
:
: He
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 see
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
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]