diff options
author | Jesse Luehrs <doy@tozt.net> | 2012-09-20 11:23:56 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2012-09-20 11:23:56 -0500 |
commit | ebce020f70f422843e1ea8380fd3ec0d8a63faff (patch) | |
tree | 5d41b560744f3fa307bff29a2bf2ee4769148fc5 /t/readonly.t | |
parent | 906bcd2d0c4fc4b4c1bbfd6616fbc3c3ba550612 (diff) | |
download | fun-ebce020f70f422843e1ea8380fd3ec0d8a63faff.tar.gz fun-ebce020f70f422843e1ea8380fd3ec0d8a63faff.zip |
Revert "make function arguments readonly"
This reverts commit 35d85cfe78dd870384d3aef07a1e852267061097.
Looks like we don't actually want this behavior.
Diffstat (limited to 't/readonly.t')
-rw-r--r-- | t/readonly.t | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/t/readonly.t b/t/readonly.t deleted file mode 100644 index f0b82ea..0000000 --- a/t/readonly.t +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env perl -use strict; -use warnings; -use Test::More; - -use Fun; - -my $thing = 1; - -fun foo ($bar) { $bar = 1 } - -ok(!eval { foo(); 1 }); -ok(!eval { foo(1); 1 }); -ok(!eval { foo($thing); 1 }); -ok(!eval { foo($thing + 1); 1 }); - -fun bar ($baz) { $baz } - -ok(eval { bar(); 1 }); -ok(eval { bar(1); 1 }); -ok(eval { bar($thing); 1 }); -ok(eval { bar($thing + 1); 1 }); - -ok(eval { $thing = 2; 1 }); -is($thing, 2); - -fun baz ($quux) { $_[0] = 1 } - -ok(eval { baz($thing); 1 }); -is($thing, 1); - -done_testing; |