diff options
Diffstat (limited to 't/op/tie.t')
-rw-r--r-- | t/op/tie.t | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/t/op/tie.t b/t/op/tie.t index b3331291fc..9301bb33a6 100644 --- a/t/op/tie.t +++ b/t/op/tie.t @@ -1030,6 +1030,16 @@ ok Modification of a read-only value attempted at - line 16. ######## +# Similarly, read-only regexps cannot be tied. +sub TIESCALAR { bless [] } +$y = ${qr//}; +Internals::SvREADONLY($y,1); +tie $y, ""; + +EXPECT +Modification of a read-only value attempted at - line 6. +######## + # tied() should still work on tied scalars after glob assignment sub TIESCALAR {bless[]} sub FETCH {*foo} |