locked_user sundialsvc4 has asked for the wisdom of the Perl Monks concerning the following question:

Catalyst::Action::Wizard looks like the cat's meow for me... but examples are scarce. Anyone got a snippet of code to offer, where they've actually used it (or its older sister, Catalyst::Plugin::Wizard)?

“An example is worth a thousand words.” Thx.

Replies are listed 'Best First'.
Re: Anyone got any examples of Catalyst::Action::Wizard?
by stonecolddevin (Parson) on Jan 08, 2009 at 11:48 UTC

    Also, check out Catalyst::Wizard. Looks to be a little bit more up to date with Catalyst best practices.

    meh.
Re: Anyone got any examples of Catalyst::Action::Wizard?
by stonecolddevin (Parson) on Jan 08, 2009 at 11:46 UTC

    Here's one from Catalyst::Plugin::Wizard. I'm not sure what you're looking for, or if you've seen this, but at least you could give us a bit of a direction that you're thinking of going by looking at this code:

    # if this called without previous wizard (i.e. new wizard) then # creating wizard with '/users/list' as first step and '/users/las +t' as second # otherwise append steps '/users/list' and '/users/last' if they w +asn't added alread $c->wizard('/users/last', '/users/list'); # going next step ('/users/list'); $c->wizard->goto_next; # creating wizard with 'correct' (left to right) steps order $c->wizard(-first => '/users/list', '/users/last'); $c->wizard->goto_next; # appending step '/users/list' and '+/users/list' -- this will add + '/users/list' into wizard twice # you can prepend first '/' with any symbols you like -- just to m +ake your step unique, so it will be added # into wizard $c->wizard(-first => '/users/list', '+/users/list', '/users/last') +; $c->wizard->goto_next; # to /users/list $c->wizard->goto_next; # again to /users/list

    Hope this helps!

    /me makes a note to check in an example wizard app once this thread is solved.

    meh.
Re: Anyone got any examples of Catalyst::Action::Wizard?
by locked_user sundialsvc4 (Abbot) on Jan 08, 2009 at 14:56 UTC

    A well-intentioned response, I am quite sure, but ... obviously “I've seen this.” :-/

    In fact, “this” is what I was referring-to as being deficient.

    In the example-section that you quoted, each one of those examples stand alone. They're not in any sort of a sequence. And this is relevant, because the path-adding calls always extend the path:   therefore, when do you extend it? I have not yet stumbled-upon an existing CPAN module that uses it nor its predecessor, which would simplify my task of putting this object to work in the manner that its designer intended.

    Alas, an example of “well, it's clear to me, the author...” ‘documentation.’ A short working example of a controller that uses it would be perfect, if I can very-quickly find one.

    Thanks for your help.