Re: [Catalyst] C::V::Email::Template - "no sender" error

2010-07-30 Thread Oleg Kostyuk
This is part of example from Catalyst::View::Email::Template:

=
$c->stash->{email} = {
to  => 'jshir...@gmail.com',
cc  => 'abra...@cpan.org',
bcc => 'hid...@secret.com hidd...@foobar.com',
from=> 'no-re...@foobar.com',
..
=

Your stash have "to" key/value pair, but don't have "from".

Also:

# grep -nr 'no sender' /usr/**/perl/
/usr/local/share/perl/5.10.1/Email/Sender/Manual/QuickStart.pm:67:those
fields.  Similarly, if no sender is specified, it will use the first
/usr/local/share/perl/5.10.1/Email/Sender/Simple.pm:106:
Email::Sender::Failure::Permanent->throw("no sender") if ! defined
$from;


HTH


2010/7/30 Ollie :
>
> Hi everyone,
>
> I'm new here, forgive my transgressions. I'm having an issue with
> Catalyst::View::Email::Template. I've posted the full details to
> perlmonks.org hoping to get a quick answer, but nothing yet. Here is a link
> to the posting:
>
> http://perlmonks.org/?node_id=852027
>
> I will copy the text of the posting for your convenience, though the
> formatting might suffer.
>
> For future reference, is the PM link enough or should I continue to post the
> full text for the archives?
>
> Thanks in advance!
>
> -Ollie
>
>
> ===
> I keep getting a "no sender" error when trying to send email via
> Catalyst::View::Email::Template. I'm pretty sure it's some sort of config
> error, but I have tried everything I can think of with no resolution. Please
> take a gander at my config and code and tell me what you think I should do.
> Thanks!
>
> Here's the code that sends the email:
>
> my $to = $user->email;
> $c->stash->{email_out} = {
>    to          =>  $to,
>    subject     =>  "XXX.com Membership Activation ($enc_string)",
>    template    =>  'activation.tt',
> };
>
> $c->forward($c->view('Email::Template'));
>
> if (not scalar @{$c->error}) {
>    $c->log->debug("*** Email sent! $to ($enc_string) ***");
> }
>
>> From MyApp.pm (not its real name, but the equivalent):
>
> __PACKAGE__->config->{'View::Email::Template'} = {
>    template_prefix =>  'emails',
>    stash_key       =>  'email_out',
>    default =>  {
>        view            =>  'TT',
>        content_type    =>  'text/plain',
>        charset         =>  'utf-8',
>    },
>    sender  =>  {
>        mailer      =>  'SMTP',
>        mailer_args =>  {
>            host            =>  'mail..com',
>            sasl_username   =>  '',
>            sasl_password   =>  '',
>            ssl             =>  1,
>        }
>    },
> };
>
> I have no config for View::Email because I don't plan on sending any
> non-templated emails. I've tried it with and without, no change. I also have
> no config directly in either my View::Email or View::Email::Template
> modules. I tried putting some in there but it didn't resolve the issue.
> Here's some of the debug output from Catalyst:
>
> [debug] Path is "send_activation_email"
> [debug] Arguments are ""
> [debug] *** Manually sending activation email ***
> [debug] *** Sending activation email ***
> [debug] *** Found existing activation, 3 ***
> [debug] C::V::Email::Template uses default view
> XXX::View::TT=HASH(0x10238e1c0) for rendering.
> [debug] C::V::Email uses default content_type text/plain.
> [debug] Rendering template "emails/activation.tt"
> [debug] C::V::Email uses specified content_type text/plain.
> [error] no sender
>
> I will post more debug output upon request, but there's nothing in there
> that appears useful, to my eyes.
>  ===
>
> ___
> List: Catalyst@lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/
>



-- 
Sincerely yours,
Oleg Kostyuk (CUB-UANIC)

___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] auth_bootstrap.pl question

2010-07-30 Thread Kieren Diment
At a guess I think that there's something wrong with your installation of 
DBIx::Class;:Schema::Loader


On 31/07/2010, at 12:35 AM, Marc Gamontini wrote:

> Hi,
> 
> Could you explain the error below (LolCatalyst example, Chapter 3, p74) ? We
> installed Catalyst::Helper::AuthDBIC and DBIx::Class::Schema::Loader (tests
> are ok).
> 
> [...@localhost LolCatalyst-Lite]# auth_bootstrap.pl -credential http
> Use of uninitialized value in concatenation (.) or string at
> /root/perl5/lib/perl5/Catalyst/Helper/AuthDBIC.pm line 95.
> Can't call method "loader_options" without a package or object reference at
> /root/perl5/lib/perl5/DBIx/Class/Schema/Loader.pm line 390.
> Thank you in advance,
> Marc
> ___
> List: Catalyst@lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/


___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


[Catalyst] C::V::Email::Template - "no sender" error

2010-07-30 Thread Ollie


Hi everyone,

I'm new here, forgive my transgressions. I'm having an issue with 
Catalyst::View::Email::Template. I've posted the full details to perlmonks.org 
hoping to get a quick answer, but nothing yet. Here is a link to the posting:


http://perlmonks.org/?node_id=852027

I will copy the text of the posting for your convenience, though the formatting 
might suffer.


For future reference, is the PM link enough or should I continue to post the 
full text for the archives?


Thanks in advance!

-Ollie


===
I keep getting a "no sender" error when trying to send email via 
Catalyst::View::Email::Template. I'm pretty sure it's some sort of config error, 
but I have tried everything I can think of with no resolution. Please take a 
gander at my config and code and tell me what you think I should do. Thanks!


Here's the code that sends the email:

my $to = $user->email;
$c->stash->{email_out} = {
to  =>  $to,
subject =>  "XXX.com Membership Activation ($enc_string)",
template=>  'activation.tt',
};

$c->forward($c->view('Email::Template'));

if (not scalar @{$c->error}) {
$c->log->debug("*** Email sent! $to ($enc_string) ***");
}


From MyApp.pm (not its real name, but the equivalent):


__PACKAGE__->config->{'View::Email::Template'} = {
template_prefix =>  'emails',
stash_key   =>  'email_out',
default =>  {
view=>  'TT',
content_type=>  'text/plain',
charset =>  'utf-8',
},
sender  =>  {
mailer  =>  'SMTP',
mailer_args =>  {
host=>  'mail..com',
sasl_username   =>  '',
sasl_password   =>  '',
ssl =>  1,
}
},
};

I have no config for View::Email because I don't plan on sending any 
non-templated emails. I've tried it with and without, no change. I also have no 
config directly in either my View::Email or View::Email::Template modules. I 
tried putting some in there but it didn't resolve the issue. Here's some of the 
debug output from Catalyst:


[debug] Path is "send_activation_email"
[debug] Arguments are ""
[debug] *** Manually sending activation email ***
[debug] *** Sending activation email ***
[debug] *** Found existing activation, 3 ***
[debug] C::V::Email::Template uses default view XXX::View::TT=HASH(0x10238e1c0) 
for rendering.

[debug] C::V::Email uses default content_type text/plain.
[debug] Rendering template "emails/activation.tt"
[debug] C::V::Email uses specified content_type text/plain.
[error] no sender

I will post more debug output upon request, but there's nothing in there that 
appears useful, to my eyes.

 ===

___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


[Catalyst] Perl::Critic & Catalyst's default

2010-07-30 Thread Paul Makepeace
One of Critic's tests causes a "Subroutine name is a homonym for
builtin keyword" whenever it encounters "sub default" since "default"
is now a perl keyword thanks to the new-ish given/when switch
construct. I think the same applies to "sub index".

One solution is to use,

  sub default : Path {  ## no critic (ProhibitBuiltinHomonyms)

Is there another non-keyword sub Catalistas recommend? Or one being considered?

Paul

___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Module::Install::Catalyst very slow

2010-07-30 Thread Curtis Jewell
On those machines which allow symlinks, unfortunately...

So the build process can't symlink without checking for support for it
first. (Catalyst DOES run on Win32, after all, as well as the Unixen.)

--Curtis

On Fri, 30 Jul 2010 07:46 -0700, "Bill Moseley" 
wrote:
> When I run Makefile.PL the Module::Install::Catalyst step can take a
> number
> of minutes -- it just took five minutes on one machine just now. I assume
> that's because of the recursive copy.
> 
> Does the build process require actual copies or could symlinks be used to
> speed up this process?
--
Curtis Jewell
csjew...@cpan.org   http://csjewell.dreamwidth.org/
p...@csjewell.fastmail.us   http://csjewell.comyr.org/perl/

"Your random numbers are not that random" -- perl-5.10.1.tar.gz/util.c

Strawberry Perl for Windows betas: http://strawberryperl.com/beta/


___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


[Catalyst] auth_bootstrap.pl question

2010-07-30 Thread Marc Gamontini
Hi,

Could you explain the error below (LolCatalyst example, Chapter 3, p74) ? We
installed Catalyst::Helper::AuthDBIC and DBIx::Class::Schema::Loader (tests
are ok).

[...@localhost LolCatalyst-Lite]# auth_bootstrap.pl -credential http
Use of uninitialized value in concatenation (.) or string at
/root/perl5/lib/perl5/Catalyst/Helper/AuthDBIC.pm line 95.
Can't call method "loader_options" without a package or object reference at
/root/perl5/lib/perl5/DBIx/Class/Schema/Loader.pm line 390.
Thank you in advance,
Marc
___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


[Catalyst] Module::Install::Catalyst very slow

2010-07-30 Thread Bill Moseley
When I run Makefile.PL the Module::Install::Catalyst step can take a number
of minutes -- it just took five minutes on one machine just now. I assume
that's because of the recursive copy.

Does the build process require actual copies or could symlinks be used to
speed up this process?

-- 
Bill Moseley
mose...@hank.org
___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Announce (JSON|XML)-RPC modules

2010-07-30 Thread Leandro Hermida
Hi,

Just had a question about these resurrected modules, will their
namespaces change in the future to
Catalyst::Controller::XMLRPC|JSONRPC like you see with other libraries
that do similar things? (e.g. Catalyst::Controller::SOAP)

best,
Leandro

___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/