Skip Menu |

This queue is for tickets about the Data-AsObject CPAN distribution.

Report information
The Basics
Id: 57471
Status: open
Priority: 0/
Queue: Data-AsObject

People
Owner: Nobody in particular
Requestors: JHTHORSEN [...] cpan.org
Cc:
AdminCc:

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



Subject: use of carp()
It would be nice if the end user could specify how the warnings should be handled. Currently it seems like the use of carp() is fixed. Not quite sure how to fix this, but what about adding methods to the Data::AsObject namespace, so at least it can be changed globally? package Data::AsObject; sub missing_element { carp "Attempting to access non-existing hash key $_[1]!" } And then inside ex. Data::AsObject::Hash, you can replace carp "Attempting to access non-existing hash key $key!" with $self->Data::AsObject::missing_element($key); And do the same for the other carp() calls in Data::AsObject*.
On Thu May 13 15:54:55 2010, JHTHORSEN wrote: Show quoted text
> It would be nice if the end user could specify how the warnings should > be handled. Currently it seems like the use of carp() is fixed.
This should be possible to customize with Sub::Exporter, I'll have a look.