[Catalyst] Re: Catalyst::View::Email config error after Catalyst upgrade

David Schmidt davewood at gmx.at
Sun Mar 29 11:26:58 BST 2009


On Sat, Mar 28, 2009 at 12:59 PM, David Schmidt <davewood at gmx.at> wrote:
> Hello everyone
>
> I've just upgraded Catalyst from 5.7015 to 5.71001.
> If I start my project development server it loads but upon requesting
> any page I get the error:
>
> Caught exception in MyApp::View::myEmail->process "Can't send email
> without a valid email structure at
> /usr/local/share/perl/5.10.0/Catalyst/Action.pm line 46"
>
> On the cpan site of C::V::Email the developer says that the config
> options have changed slightly but I cannot figure out wether the docs
> represent the new or old config style.
>
> http://search.cpan.org/~jshirley/Catalyst-View-Email-0.13/lib/Catalyst/View/Email.pm
>
> WARNING: since version 0.10 the configuration options slightly changed!
>
> This is were the error comes from in /Catalyst/View/Email.pm
>
>    my $email  = $c->stash->{$self->{stash_key}};
>    croak "Can't send email without a valid email structure"
>        unless $email;
>
> but I have the stash_key configured in MyApp/lib/MyApp.pm
> __PACKAGE__->config(
>    'View::Email' => {
>        stash_key => 'email',
>        default => {
>            content_type => 'text/plain',
>            charset => 'utf-8'
>        },
>        sender => {
>            mailer => 'SMTP',
>            mailer_args => {
>                Host     => 'test.smtp.at', # defaults to localhost
>                username => 'blah',
>                password => 'foo',
>                ssl      => 1
>            }
>        }
>    }
> };
>
> and it also seems to be configured in MyApp/lib/MyApp/View/myEmail.pm
> __PACKAGE__->config(
>    stash_key => 'email'
> );
>
> well, that's it for now. thanks in advance for any pointers.
>
> david
>

This doesn't seem to be related to C:V:Email but rather to some config
not getting loaded.

When I start my app the first lines are

david at foo:~/catalyst/MyApp$ DBIC_TRACE=1 ./script/myapp_server.pl -d -r
Subroutine initialize redefined at /usr/share/perl5/Class/C3.pm line 70.
Subroutine uninitialize redefined at /usr/share/perl5/Class/C3.pm line 88.
Subroutine reinitialize redefined at /usr/share/perl5/Class/C3.pm line 101.
Use of uninitialized value $text in split at
/usr/local/share/perl/5.10.0/Text/SimpleTable.pm line 239.
Use of uninitialized value $text in split at
/usr/local/share/perl/5.10.0/Text/SimpleTable.pm line 239.
Use of uninitialized value $text in split at
/usr/local/share/perl/5.10.0/Text/SimpleTable.pm line 239.
(...)
Use of uninitialized value $text in split at
/usr/local/share/perl/5.10.0/Text/SimpleTable.pm line 239.
Use of uninitialized value $text in split at
/usr/local/share/perl/5.10.0/Text/SimpleTable.pm line 239.
[debug] Debug messages enabled
[debug] Statistics enabled
[debug] Loaded plugins:
(...)

Caught exception in MyApp::Controller::Root->end
"Catalyst::Action::RenderView could not find a view to forward to."

I set default_view => 'myView' in lib/MyApp.pm after I have seen this
error but to no avail.


david



More information about the Catalyst mailing list