1N/A# Add new tests to the end with format: 1N/A# Warn or die msgs (if any) at - line 1234 1N/A print("not ok $i # bad test format\n"), next 1N/A# standard behaviour, without any extra references 1N/A# standard behaviour, without any extra references 1N/A# standard behaviour, with 1 extra reference 1N/A# standard behaviour, with 1 extra reference via tied 1N/A# standard behaviour, with 1 extra reference which is destroyed 1N/A# standard behaviour, with 1 extra reference via tied which is destroyed 1N/A# strict behaviour, without any extra references 1N/A# strict behaviour, with 1 extra references generating an error 1N/A# strict behaviour, with 1 extra references via tied generating an error 1N/A# strict behaviour, with 1 extra references which are destroyed 1N/A# strict behaviour, with extra 1 references via tied which are destroyed 1N/A# strict error behaviour, with 2 extra references 1N/A# strict behaviour, check scope of strictness. 1N/A# Forbidden aggregate self-ties 1N/A# Allowed scalar self-ties 1N/A# Allowed glob self-ties 1N/A# Allowed IO self-ties 1N/A# TODO IO "self-tie" via TEMP glob 1N/A# Interaction of tie and vec 1N/A# correct unlocalisation of tied hashes (patch #16431) 1N/A# An attempt at lvalueable barewords broke this 1N/ACan't modify constant item in tie at - line 3, near "'main';" 1N/AExecution of - aborted due to compilation errors. 1N/A# localizing tied hash slices 1N/Aprint exists $ENV{FooA} ? 1 : 0, "\n"; 1N/Aprint exists $ENV{FooB} ? 2 : 0, "\n"; 1N/Aprint exists $ENV{FooC} ? 3 : 0, "\n"; 1N/A local @ENV{qw(FooA FooC)}; 1N/A print exists $ENV{FooA} ? 4 : 0, "\n"; 1N/A print exists $ENV{FooB} ? 5 : 0, "\n"; 1N/A print exists $ENV{FooC} ? 6 : 0, "\n"; 1N/Aprint exists $ENV{FooA} ? 7 : 0, "\n"; 1N/Aprint exists $ENV{FooB} ? 8 : 0, "\n"; 1N/Aprint exists $ENV{FooC} ? 9 : 0, "\n"; # this should not exist 1N/A# [20020716.007] - nested FETCHES 1N/A# test untie() from within FETCH 1N/A# the hash element should not be tied anymore 1N/A# the tmps returned by FETCH should appear to be SCALAR 1N/A# (even though they are now implemented using PVLVs.) 1N/A# [perl #23287] segfault in untie 1N/A# Test case from perlmonks by runrig 1N/A# "Here is what I tried. I think its similar to what you've tried 1N/A# above. Its odd but convienient that after untie'ing you are left with 1N/A# a variable that has the same value as was last returned from 1N/A# FETCH. (At least on my perl v5.6.1). So you don't need to pass a 1N/A# reference to the variable in order to set it after the untie (here it 1N/A# is accessed through a closure)." 1N/A# [perl #22297] cannot untie scalar from within tied FETCH 1N/A#print "WILL EXTERNAL UNTIE $ref\n"; 1N/A#print "counter = $counter\n"; 1N/A #print "WILL INTERNAL UNITE $ref\n"; 1N/A $_[0]->{$_[1]} = $_[2]; 1N/A# test scalar on tied hash when no SCALAR method has been given 1N/A $_[0]->{$_[1]} = $_[2]; 1N/A print "not empty\n"; 1N/Aprint "not empty\n" if %h; 1N/Aprint "not empty\n" if %h; 1N/Aprint "not empty\n" if %h; 1N/Aprint "empty\n" if ! %h;