Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Catalyst-Plugin-ErrorCatcher CPAN distribution.

Report information
The Basics
Id: 64969
Status: new
Priority: 0/
Queue: Catalyst-Plugin-ErrorCatcher

People
Owner: chisel [...] chizography.net
Requestors: chisel [...] chizography.net
Cc:
AdminCc:

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



Subject: FEATURE REQUEST: Support Catalyst::Plugin::ErrorCatcher::Email::Env
Date: Thu, 20 Jan 2011 22:49:16 +0000
To: bug-Catalyst-Plugin-ErrorCatcher [...] rt.cpan.org
From: Chisel <chisel [...] chizography.net>
Show quoted text
---------- Forwarded message ---------- From: Daniel Westermann-Clark <danieltwc@cpan.org> Date: Wed, Oct 27, 2010 at 6:40 AM Subject: Re: Catalyst::Plugin::ErrorCatcher::Email::Env To: Chisel <chisel@chizography.net> Chisel, Thanks for emailing me. I had sent an email to chisel@herlpacker.co.uk when I posted the code on GitHub but never heard back. I'm not entirely sure what the most sensible factoring is, but I found that my emit and _build_msg methods duplicated a lot of what's being done in Catalyst::Plugin::ErrorCatcher::Email::emit. One place to start, I think, would be to add a _build_msg (or similar) method to Catalyst::Plugin::ErrorCatcher::Email. In theory that would be the only thing I'd need to override. I think it would also help if Catalyst::Plugin::ErrorCatcher::Email used instance methods instead of class methods. That way I could simply call the parent's method, modify the MIME::Lite object, and return that. For example: sub _build_msg { my ($self, $config) = @_; my $msg = $self->next::method($config); # ... modify $msg to add attachment ... return $msg; } On 2010-10-22 20:58:48 +0100, Chisel wrote:
> Hi there, > > I just stumbled across Catalyst::Plugin::ErrorCatcher::Email::Env and > spotted your comment: > > Due to the way that L<Catalyst::Plugin::ErrorCatcher::Email> is > constructed, we cannot easily wrap additional functionality, so we end > up duplicating some of what exists in > L<Catalyst::Plugin::ErrorCatcher::Email>. > > What changes would make this easier for you to not have to reproduce
chunks
> of my module? > > > I'm happy to try to make things easier for you; I'm not yet sure what the > most helpful changes would be though. > > > Let me know and I'll see if there's anything I can do. > > > Chiz > > > -- > Chisel > e: chisel@chizography.net > w: http://chizography.net
-- Daniel Westermann-Clark -- Chisel e: chisel@chizography.net w: http://chizography.net