diff options
Diffstat (limited to 'lib/MDK/Common/Func.pm')
-rw-r--r-- | lib/MDK/Common/Func.pm | 4 |
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]; } |