artist has asked for the wisdom of the Perl Monks concerning the following question:
In the above code, I don't have way to check the value of $id. I like to make value of $id available to all the run modes. How I can do that? I need to pass the 'id' from the main application, because I am getting it from another application via CGI.package main; use MyApp; my $app = MyApp->new(id=> '123'); $app->run(); package MyApp; use base CGI::Application; sub setup { my $self = shift; my $query = $self->query(); my $id = $query->param('id'); }
Thanks,
artist.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: CGI::Application question
by Limbic~Region (Chancellor) on Mar 22, 2005 at 21:07 UTC | |
|
Re: CGI::Application question
by johnnywang (Priest) on Mar 22, 2005 at 21:03 UTC | |
by artist (Parson) on Mar 22, 2005 at 21:18 UTC | |
|
Re: CGI::Application question
by dragonchild (Archbishop) on Mar 22, 2005 at 21:00 UTC | |
|
Re: CGI::Application question
by kprasanna_79 (Hermit) on Mar 23, 2005 at 06:03 UTC |