Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

(zdog) Re: Conceptualizing

by zdog (Priest)
on Dec 16, 2001 at 05:30 UTC ( #132287=note: print w/replies, xml ) Need Help??

in reply to Conceptualizing

I'm not very good with OO terminology so I am not going to try to explain. However, under normal circustances, one will not do "use CGI qw(:standard);" and "my $q = new CGI;" at the same time. Both provide you with an interface for accessing CGI parameters, but go about it a little differently. With the example you have above, you could do this:
use CGI; my $q = new CGI; my $value = $q->param ('ord_id');
The param function assciated with the CGI object $q returns the value of the parameter passed to the script, so now $value contains whatever the order id was. The following does the same thing:
use CGI qw (:standard); my $value = param ('ord_id');
Except this time, param is no longer associated with an object and can be treated like any regular sub. Hope that helps at least a bit.

Zenon Zabinski | zdog |

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://132287]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2022-12-03 18:22 GMT
Find Nodes?
    Voting Booth?

    No recent polls found