From 4b790745bdcac576ea7d13292b1fb6ef66dddfa1 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 5 Apr 2001 23:46:23 +0000 Subject: (if_): better logging of the error --- perl-install/common.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'perl-install/common.pm') diff --git a/perl-install/common.pm b/perl-install/common.pm index 4213c4fdc..ab5c9419d 100644 --- a/perl-install/common.pm +++ b/perl-install/common.pm @@ -151,13 +151,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"; + wantarray || @_ <= 1 or die("if_ called in scalar context with more than one argument " . 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"; + wantarray || @_ <= 1 or die("if_ called in scalar context with more than one argument " . join(":", caller())); wantarray ? @_ : $_[0]; } sub arch() { -- cgit v1.2.1