diff options
-rw-r--r-- | dist/Tie-File/t/43_synopsis.t | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/dist/Tie-File/t/43_synopsis.t b/dist/Tie-File/t/43_synopsis.t index f7abde1080..56688493ef 100644 --- a/dist/Tie-File/t/43_synopsis.t +++ b/dist/Tie-File/t/43_synopsis.t @@ -146,6 +146,11 @@ $desc = "got expected element"; : print "not ok $N - $desc\n"; $N++; +# Untie the first file +my $u = untie @array; +$o = undef; # destroy object holding file open +# TODO: perldoc -f untie does not specify return value for untie + open my $G, "<", $file or die "Unable to open $file for reading: $!"; open my $H, ">", $dupe or die "Unable to open $dupe for writing: $!"; while (my $l = <$G>) { @@ -155,10 +160,6 @@ while (my $l = <$G>) { close $H or die "Unable to close $dupe after writing: $!"; close $G or die "Unable to close $file after reading: $!"; -# Untie the first file -my $u = untie @array; -# TODO: perldoc -f untie does not specify return value for untie - $desc = 'tie to dupe file'; my @dupe; my $p = tie @dupe, 'Tie::File', $file; |