FAQ
Hi,

Could you please verify that the 'begin' action in the application
is called even if a controller class has an action matching the request?

It does not work for me, and when I look at the code in
Catalyst::Dispatcher::dispatch, here's what happens: if an action is
present, the code sets the $namespace variable to the name of the class
that defines the action. It's the short name ('entry'), not the Perl
package name ('My::App::M::Entry'). Then it calls get_action() which, I
suppose, should retrieve *some* 'begin' action, from the class 'entry'
or from the application. If the class 'entry' has a 'begin' action, it's
called, but the application's 'begin' is not.

Am I using it in a wrong way? Does it work for anyone?

Thanks,
Simon
--

Simon (Vsevolod ILyushchenko) simonf@cshl.edu
http://www.simonf.com

Terrorism is a tactic and so to declare war on terrorism
is equivalent to Roosevelt's declaring war on blitzkrieg.

Zbigniew Brzezinski, U.S. national security advisor, 1977-81

Search Discussions

  • Andreas Marienborg at Jul 30, 2005 at 10:12 am
    If you want to have something run with each "step" outwards, use
    auto. only one begin and end will be run on each action.

    Andreas
    On 22. jul. 2005, at 22.18, Vsevolod (Simon) Ilyushchenko wrote:

    Hi,

    Could you please verify that the 'begin' action in the application
    is called even if a controller class has an action matching the
    request?

    It does not work for me, and when I look at the code in
    Catalyst::Dispatcher::dispatch, here's what happens: if an action
    is present, the code sets the $namespace variable to the name of
    the class that defines the action. It's the short name ('entry'),
    not the Perl package name ('My::App::M::Entry'). Then it calls
    get_action() which, I suppose, should retrieve *some* 'begin'
    action, from the class 'entry' or from the application. If the
    class 'entry' has a 'begin' action, it's called, but the
    application's 'begin' is not.

    Am I using it in a wrong way? Does it work for anyone?

    Thanks,
    Simon
    --

    Simon (Vsevolod ILyushchenko) simonf@cshl.edu
    http://www.simonf.com

    Terrorism is a tactic and so to declare war on terrorism
    is equivalent to Roosevelt's declaring war on blitzkrieg.

    Zbigniew Brzezinski, U.S. national security advisor, 1977-81

    _______________________________________________
    Catalyst mailing list
    Catalyst@lists.rawmode.org
    http://lists.rawmode.org/mailman/listinfo/catalyst

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcatalyst @
categoriescatalyst, perl
postedJul 22, '05 at 10:16p
activeJul 30, '05 at 10:12a
posts2
users2
websitecatalystframework.org
irc#catalyst

People

Translate

site design / logo © 2022 Grokbase