In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/41e07bbccec49c484a622d86a1ba01136a740d9f?hp=d8ef3a16edf6875955d642f8f57ad55bddac9c71>
- Log ----------------------------------------------------------------- commit 41e07bbccec49c484a622d86a1ba01136a740d9f Author: Nicholas Clark <[email protected]> Date: Tue Jun 14 17:32:12 2011 +0200 In magic.t, restore $$ after modifying it. Otherwise tests for setting $0 fail on any Linux or FreeBSD machine which happens to have a running process 42. (The value $$ is set to for the assignment test). Without a running process 42, those tests skip, on the assumption that they aren't running on a suitable platform to read the process name with external commands. ----------------------------------------------------------------------- Summary of changes: t/op/magic.t | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/t/op/magic.t b/t/op/magic.t index 585cc40..798a62e 100644 --- a/t/op/magic.t +++ b/t/op/magic.t @@ -169,6 +169,7 @@ eval { die "foo\n" }; is $@, "foo\n"; cmp_ok($$, '>', 0); +my $pid = $$; eval { $$ = 42 }; is $$, 42, '$$ can be modified'; SKIP: { @@ -185,6 +186,7 @@ SKIP: { exit; } } +$$ = $pid; # Tests below use $$ # $^X and $0 { -- Perl5 Master Repository
