in reply to Re: help with start_table of CGI.pm
in thread help with start_table of CGI.pm

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re^3: help with start_table of CGI.pm
by GrandFather (Saint) on Feb 01, 2007 at 21:17 UTC

    "which I've always used" - we call that cargo cult programming ;-). See the 'Method Invocation' section in perlobj for an explanation of the two idioms.

    I strongly recommend that you always use strict! There are ways of turning off some of the checking locally, but generally issues flagged by use strict; have better solutions.

    Update: fixed documentation link


    DWIM is Perl's answer to Gödel
    A reply falls below the community's threshold of quality. You may see it by logging in.
    A reply falls below the community's threshold of quality. You may see it by logging in.
Re^3: help with start_table of CGI.pm
by chakram88 (Pilgrim) on Feb 02, 2007 at 14:44 UTC
    As GrandFather pointed out it's a matter of method invocation.

    You may very well have created a CGI object at the start of your code ... but in your OP (and here in your now working call) you are not calling a method on that obj, you're calling a class method.

    I suggest you use a different name for your variable, something like $cgi to avoid confusion between your obj and the class.