in reply to CGI::Application - How to use a module for each runmode?
The approach is kinda wonky but hey ... I would just pass what you need either to new and/or output. I would loosely couple the modules and rather than pass the objects, pass only the info I need:
sub start { my ( $self ) = @_; my $query = $self->query(); my $foo = $query->param( 'foo' ); my $bar = $query->param( 'bar' ); my $baz = $self->param( 'my_param' ); my $start = Start->new(); $start->output( qux => $foo, quux => $bar, corge => $baz ); }
|
|---|