Just put all the calls to those multitude of subroutines inside the cgi block and switch to our :)
#!/usr/bin/perl use strict; # https://perlmonks.org/?node_id=11148743 use warnings; use CGI::Tiny; our $cgi; cgi { $cgi = $_; some_sub_somewhere_else(); }; sub some_sub_somewhere_else { my $bookparam = $cgi->param('book') || ''; $cgi->render (text => "bookparam is $bookparam\n"); }
In reply to Re^3: CGI::Tiny versus undefined parameter/form field
by tybalt89
in thread CGI::Tiny versus undefined parameter/form field
by Polyglot
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |