Update of /cvsroot/module-build/Module-Build/lib/Module/Build
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10882
Modified Files:
Base.pm
Log Message:
carp() is too fancy about printing stack traces, just fix up warn() to
subtract 1 frame from the call stack.
Index: Base.pm
===================================================================
RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v
retrieving revision 1.374
retrieving revision 1.375
diff -u -d -r1.374 -r1.375
--- Base.pm 10 Jan 2005 04:24:23 -0000 1.374
+++ Base.pm 10 Jan 2005 04:27:32 -0000 1.375
@@ -121,8 +121,17 @@
################## End constructors #########################
sub log_info { print @_ unless shift()->quiet }
-sub log_warn { shift; Carp::carp @_; }
sub log_verbose { shift()->log_info(@_) if $_[0]->verbose }
+sub log_warn {
+ # Try to make our call stack invisible
+ shift;
+ if (@_ and $_[-1] !~ /\n$/) {
+ my (undef, $file, $line) = caller();
+ warn @_, " at $file line $line.\n";
+ } else {
+ warn @_;
+ }
+}
sub _set_install_paths {
my $self = shift;
|