About the usage ‘my $q=new CGI();’

About the usage my $q=new CGI();

  • Why do you switch between OO and function-based use of CGI.pm? Why do you use the, potentially problematic, new CGI syntax instead of the recommended CGI->new syntax?
  • In other languages new is a keyword. In Perl it’s just a method name. Which is what makes new Class rather fragile and best avoided. It’s annoying that there is so much documentation out there that uses this syntax.