develooper Front page | perl.perl5.porters | Postings from July 2001

Re: [PATCH 5.6.1] debugger fixes

Thread Previous | Thread Next
From:
Mike Guy
Date:
July 3, 2001 07:05
Subject:
Re: [PATCH 5.6.1] debugger fixes
Message ID:
E15HQnv-0005fN-00@draco.cus.cam.ac.uk
Ilya Zakharevich <ilya@math.ohio-state.edu> wrote
> -  my $mess = Carp::longmess(@_);
> +  my $mess = "@_";
> +  { 
> +    package Carp;		# Do not include us in the list
> +    eval {
> +      $mess = Carp::longmess(@_);
> +    };
> +  }

Shouldn't the fallback be

     my $mess = join '', @_;

?

And even that won't do the right thing with objects.   You need something
like

     my $mess = ref $_[0] ? $_[0] : join '', @_;

Also, now that there is a fallback if Carp fails to load, can't we
strike out the

   die(@_, "\nCannot print stack trace, load with -MCarp option to see stack")

just above?


Mike Guy

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About