Skip Menu |

This queue is for tickets about the Struct-Dumb CPAN distribution.

Report information
The Basics
Id: 111119
Status: open
Priority: 0/
Queue: Struct-Dumb

People
Owner: Nobody in particular
Requestors: kes-kes [...] yandex.ru
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Do die while array dereference
This small patch allow applications survive if they occasionally try to dereference it. For example by Data::Dump::pp while trying to dump local variables on exception occur '@{}' => sub { return $_[0] if !HAVE_OVERLOADING and caller eq __PACKAGE__; --- # carp "Cannot use $pkg as an ARRAY reference"; +++ [ "Cannot use $pkg as an ARRAY reference" ] },
On Tue Jan 12 07:15:11 2016, kes-kes@yandex.ru wrote: Show quoted text
> This small patch allow applications survive if they occasionally try > to dereference it. For example by Data::Dump::pp while trying to dump > local variables on exception occur > > '@{}' => sub { return $_[0] if !HAVE_OVERLOADING and caller eq > __PACKAGE__; > --- # carp "Cannot use $pkg as an ARRAY > reference"; > +++ [ "Cannot use $pkg as an ARRAY reference" ] > },
I'm not sure I like that approach. A far nicer solution would be to give Data::Dump (via Data::Dump::Filtered) the native ability to print the structure of these things in a nicer way. I'm currently working on a solution for that. For now, see the newly-added _forbid_arrayification feature of 0.09. -- Paul Evans