There are also other tools / modules available. I have used Embperl http://perl.apache.org/embperl/index.html, which uses CGI.pm under the covers. I am not sure about HTML::Mason, but I would not be surprised it if also uses CGI.pm too. There are probably other HTML generation / templating / web site generation tools that use CGI.pm
Just as an FYI, HTM::Mason does provide access to the CGI.pm.
You are advised to not access the structure directly, even
though you can. Mason provides access through object
references.
Also, you are able to take advantage of the HTML constructs
as documented in the Mason FAQ here
I'm inclined to believe that using the CGI constructs is
probably a "good thing" as you get the side benefit,
as merlyn states: Re: Re: use CGI or die;, of CGI.pm spitting out XHTML.
My favourite for embedding Perl into *ML is
Apache::ASP. The homepage is
here.
Last time I checked,
it relied on CGI.pm for file upload and allowed to mix
freely CGI.pm and Apache::ASP calls in the same page.
I find the Active Server Pages model (with Perl as
a programming language) quite
useful when writing Web applications.