Skip to content

Commit

Permalink
Eliminated the source of some "Modification of a read-only value..." …
Browse files Browse the repository at this point in the history
…errors.

Patch from Juan Camacho.
  • Loading branch information
rjray committed Jul 31, 2005
1 parent bccc774 commit dda4f48
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions t/10_data.t
Expand Up @@ -31,12 +31,12 @@ for (sort keys %val_tbl)
}

# Go again, with each of the values being a blessed scalar reference
my @vals = \(int(rand 10000) + 1, int(rand 10000) + 1, rand 10001, __FILE__);
my @vals = (int(rand 10000) + 1, int(rand 10000) + 1, rand 10001, __FILE__);
%val_tbl = (
'int' => bless(shift(@vals), "Tmp::Scalar::Int"),
i4 => bless(shift(@vals), "Tmp::Scalar::I4"),
double => bless(shift(@vals), "Tmp::Scalar::Double"),
string => bless(shift(@vals), "Tmp::Scalar::String")
'int' => bless(\(shift(@vals)), "Tmp::Scalar::Int"),
i4 => bless(\(shift(@vals)), "Tmp::Scalar::I4"),
double => bless(\(shift(@vals)), "Tmp::Scalar::Double"),
string => bless(\(shift(@vals)), "Tmp::Scalar::String")
);

for (sort keys %val_tbl)
Expand Down

0 comments on commit dda4f48

Please sign in to comment.