From 7e30e5e91662820a7498bc7024b9515fc3bb5bda Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Mon, 17 Jan 2011 13:37:49 -0600 Subject: be less obscure here --- lib/Dist/CheckConflicts.pm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/Dist/CheckConflicts.pm b/lib/Dist/CheckConflicts.pm index 960c5ac..ac860c7 100644 --- a/lib/Dist/CheckConflicts.pm +++ b/lib/Dist/CheckConflicts.pm @@ -156,8 +156,14 @@ sub import { _check_version($HAS_CONFLICTS{$mod}, $mod); - my $i = 1; - return sub { $_ = $i-- if $i }; # the previous require already handled it + # the previous require already handled it + my $called; + return sub { + return 0 if $called; + $_ = "1;"; + $called = 1; + return 1; + }; }, \%CONFLICTS, # arbitrary but unique, see above ]; -- cgit v1.2.3