summaryrefslogtreecommitdiffstats
path: root/lib/MDK
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2010-07-20 10:27:07 +0000
committerThierry Vignaud <tv@mandriva.org>2010-07-20 10:27:07 +0000
commit36e0116c3e823057599b76fcb84a9e2be5c3a6d2 (patch)
tree3883b556d594f38067905bbbb6be9199fb7021ba /lib/MDK
parent4a47f90047af1288ed1cceb43da310eef4844a15 (diff)
downloadperl-MDK-Common-36e0116c3e823057599b76fcb84a9e2be5c3a6d2.tar
perl-MDK-Common-36e0116c3e823057599b76fcb84a9e2be5c3a6d2.tar.gz
perl-MDK-Common-36e0116c3e823057599b76fcb84a9e2be5c3a6d2.tar.bz2
perl-MDK-Common-36e0116c3e823057599b76fcb84a9e2be5c3a6d2.tar.xz
perl-MDK-Common-36e0116c3e823057599b76fcb84a9e2be5c3a6d2.zip
(if_, if__) make easier to debug (#60153)
Diffstat (limited to 'lib/MDK')
-rw-r--r--lib/MDK/Common/Func.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/MDK/Common/Func.pm b/lib/MDK/Common/Func.pm
index b78ebc4..07b308f 100644
--- a/lib/MDK/Common/Func.pm
+++ b/lib/MDK/Common/Func.pm
@@ -183,13 +183,13 @@ sub may_apply { $_[0] ? $_[0]->($_[1]) : (@_ > 2 ? $_[2] : $_[1]) }
sub if_($@) {
my $b = shift;
$b or return ();
- wantarray() || @_ <= 1 or die("if_ called in scalar context with more than one argument " . join(":", caller()));
+ wantarray() || @_ <= 1 or die("if_ called in scalar context with more than one argument :\nargs=" . join(", ", @_) . "\ncaller=" . join(":", caller()));
wantarray() ? @_ : $_[0];
}
sub if__($@) {
my $b = shift;
defined $b or return ();
- wantarray() || @_ <= 1 or die("if__ called in scalar context with more than one argument " . join(":", caller()));
+ wantarray() || @_ <= 1 or die("if__ called in scalar context with more than one argument :\nargs=" . join(", ", @_) . "\ncaller=" . join(":", caller()));
wantarray() ? @_ : $_[0];
}