FAQ
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

Search Discussions

  • David Schmidt at Mar 29, 2009 at 11:26 am

    On Sat, Mar 28, 2009 at 12:59 PM, David Schmidt 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@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
  • Jason Galea at Mar 29, 2009 at 2:00 pm
    Hi David,

    setting default_view in my config appears to have fixed this for me.. (I
    have other, unrelated, issues now)

    default_view: MyApp::View::TT

    hope this helps..

    cheers,

    J

    David Schmidt 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

    _______________________________________________
    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/
  • David Schmidt at Mar 29, 2009 at 4:52 pm

    On Sun, Mar 29, 2009 at 3:00 PM, Jason Galea wrote:
    Hi David,

    setting default_view in my config appears to have fixed this for me.. (I
    have other, unrelated, issues now)

    default_view: MyApp::View::TT

    hope this helps..

    cheers,

    J

    David Schmidt 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

    _______________________________________________
    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/
    Ye it did so for me too.
    These lines are still here though

    Use of uninitialized value $text in split at
    /usr/local/share/perl/5.10.0/Text/SimpleTable.pm line 239.

    I really hoped the upgrade from Catalyst 5.70 to 5.71 wouldnt break my app.

    Thanks for your reply :)

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcatalyst @
categoriescatalyst, perl
postedMar 28, '09 at 10:59a
activeMar 29, '09 at 4:52p
posts4
users2
websitecatalystframework.org
irc#catalyst

2 users in discussion

David Schmidt: 3 posts Jason Galea: 1 post

People

Translate

site design / logo © 2021 Grokbase