NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
what he said (Score:1)
Re: (Score:0)
I actually tried installing Jifty last night because I realized it might be more what I had in mind (continuations, Mason...), but I aborted the install after about a half hour of exciting CPAN action. (Maybe I should try Catalyst I guess, but it's never really felt right to me..)
Then I ended up doing just what you mentioned, using Mason as a standalone script. It wasn't very elegant, though. Unfortunately
Re:what he said (Score:1)
sub main {
my $request = shift;
my $app = App->new(request => $request);
$app->run;
}
package App.pm;
#
sub run {
my $self = shift;
$self->display('/one.html');
my $num1 = $self->param('num');
$self->display('/two.html');
my $num2 = $self->param('num');
$self->display('/sum.html',
num1 => $num1,
num2 => $num2,
sum => $num1 + $num2);
}
Also, instead of explicitly getting and setting num1 num2 etc, maybe you can use $request->params, which returns a list of all name/value pairs (you can treat it like a hash if you like) -- take that and give the whole thing to each template. Or something.
Reply to This
Parent