Skip Menu |

This queue is for tickets about the Email-Sender-Transport-SMTP-TLS CPAN distribution.

Report information
The Basics
Id: 52023
Status: resolved
Priority: 0/
Queue: Email-Sender-Transport-SMTP-TLS

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

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



Subject: Error in Moose (easy fix?)
When I installed Email-Sender-Transport-SMTP-TLS 0.03 on my computer, I got the following warning during testing: Show quoted text
---- OUTPUT BEGINS HERE ---- t/00-load.t .. You are overwriting a locally defined method (allow_partial_success) with an accessor at /usr/share/perl5/Moose/Meta/ Attribute.pm line 601 Moose::Meta::Attribute::_process_accessors ('Moose::Meta::Attribute=HASH(0x923ba20)', 'reader', 'allow_partial_success', undef) called at /usr/lib/perl5/Class/MOP/ Attribute.pm line 406 Class::MOP::Attribute::install_accessors ('Moose::Meta::Attribute=HASH(0x923ba20)') called at /usr/share/perl5/ Moose/Meta/Attribute.pm line 572 Moose::Meta::Attribute::install_accessors ('Moose::Meta::Attribute=HASH(0x923ba20)') called at /usr/lib/perl5/ Class/MOP/Class.pm line 741 eval {...} called at /usr/lib/perl5/Class/MOP/Class.pm line 741 Class::MOP::Class::add_attribute('Moose::Meta::Class=HASH (0x8875a58)', 'Moose::Meta::Attribute=HASH(0x923ba20)') called at /usr/ share/perl5/Moose/Meta/Class.pm line 250 Moose::Meta::Class::add_attribute('Moose::Meta::Class=HASH (0x8875a58)', 'allow_partial_success', 'isa', 'Bool', 'default', 0, 'definition_context', 'HASH(0x8f21580)', 'is', ...) called at /usr/ share/perl5/Moose.pm line 69 Moose::has('Moose::Meta::Class=HASH(0x8875a58)', 'allow_partial_success', 'is', 'ro', 'isa', 'Bool', 'default', 0) called at /usr/share/perl5/Moose/Exporter.pm line 288 Moose::has('allow_partial_success', 'is', 'ro', 'isa', 'Bool', 'default', 0) called at /home/vaidyagi/.cpan/build/Email-Sender- Transport-SMTP-TLS-0.03-QbmvJC/blib/lib/Email/Sender/Transport/SMTP/ TLS.pm line 17 require Email/Sender/Transport/SMTP/TLS.pm called at (eval 4) line 2 main::BEGIN() called at /home/vaidyagi/.cpan/build/Email-Sender- Transport-SMTP-TLS-0.03-QbmvJC/blib/lib/Email/Sender/Transport/SMTP/ TLS.pm line 0 eval {...} called at /home/vaidyagi/.cpan/build/Email-Sender- Transport-SMTP-TLS-0.03-QbmvJC/blib/lib/Email/Sender/Transport/SMTP/ TLS.pm line 0 eval 'package main; use Email::Sender::Transport::SMTP::TLS @{$args[0]}; 1; ;' called at /usr/share/perl/5.10/Test/More.pm line 805 Test::More::_eval('package main;\x{a}use Email::Sender::Transport::SMTP::TLS @{$args...', 'ARRAY(0x883b7c0)') called at /usr/share/perl/5.10/Test/More.pm line 780 Test::More::use_ok('Email::Sender::Transport::SMTP::TLS') called at t/00-load.t line 6 main::BEGIN() called at /home/vaidyagi/.cpan/build/Email-Sender- Transport-SMTP-TLS-0.03-QbmvJC/blib/lib/Email/Sender/Transport/SMTP/ TLS.pm line 0 eval {...} called at /home/vaidyagi/.cpan/build/Email-Sender- Transport-SMTP-TLS-0.03-QbmvJC/blib/lib/Email/Sender/Transport/SMTP/ TLS.pm line 0 t/00-load.t .. 1/1 # Testing Email::Sender::Transport::SMTP::TLS 0.03, Perl 5.010001, /usr/bin/perl t/00-load.t .. ok t/pod.t ...... ok All tests successful. Files=2, Tests=2, 1 wallclock secs ( 0.04 usr 0.01 sys + 0.79 cusr 0.07 csys = 0.91 CPU) Result: PASS
---- OUTPUT ENDS HERE ---- As you can see, tests pass (and the module is installed), but Moose produces this warning every time E::S::T::S::TLS is loaded. I'm on Perl v5.10.1, Moose 0.92. I don't know much about Moose, but after poking around inside E::S::T::SMTP a bit, I made the attached patch, which seems to silence this warning on my computer. I don't know if this will affect 'allow_partial_success' (I don't use that in my own program), but all the included tests seem to pass, and normal e-mail sending works fine, so hopefully this is atleast near the Perfect Solution :). Hope this helps!
Subject: email-sender-transport-smtp-tls-Moose-exclude.patch
--- old/Email/Sender/Transport/SMTP/TLS.pm 2009-06-18 10:17:36.000000000 +0800 +++ new/Email/Sender/Transport/SMTP/TLS.pm 2009-11-24 16:55:22.000000000 +0800 @@ -1,7 +1,7 @@ package Email::Sender::Transport::SMTP::TLS; use Moose; -with 'Email::Sender::Transport'; +with 'Email::Sender::Transport' => { excludes => 'allow_partial_success' }; our $VERSION = '0.03';
yeah, it's a valid patch. thanks for it. 0.04 is on the way CPAN. Thanks.