1use Test::More tests => 1;
2 
3package dumb_thing;
4
5use strict; use warnings;
6use Tie::Array;
7use Carp;
8use base 'Tie::StdArray';
9
10sub TIEARRAY {
11    my $class = shift;
12    my $this  = bless [], $class;
13    my $that  = shift;
14
15    @$this = @$that;
16
17    $this;
18}
19
20package main;
21
22use strict; use warnings;
23use Storable qw(freeze thaw);
24
25my $x = [1,2,3,4];
26
27broken($x); # ties $x
28broken( thaw( freeze($x) ) ); # since 5.16 fails with "Cannot tie unreifiable array"
29
30sub broken {
31    my $w = shift;
32    tie @$_, dumb_thing => $_ for $w;
33}
34
35# fails since 5.16
36ok 1, 'Does not fail with "Cannot tie unreifiable array" RT#84705';
37