SoccerRocks has asked for the wisdom of the Perl Monks concerning the following question:
As opposed to doing the following:# Case 1 use CGI qw(:cgi); my $value = param("Name");
It is my understanding that Case 1 will load a whole bunch of subs because of the EXPORT tag :cgi. What happens in Case 2? Are only the subs loaded that the handle $q references? When do they get loaded? Is there any documentation that addresses this area? I think this has to do with Autloader and SelfLoader but I am fuzzy on the things I have read about these topics.# Case 2 use CGI; my $q = CGI->new; my $value = $q->param("Name");
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: What gets loaded
by daxim (Curate) on Jul 27, 2012 at 16:18 UTC | |
|
Re: What gets loaded
by choroba (Cardinal) on Jul 27, 2012 at 15:55 UTC |