Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

(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
Node Status?
node history
Node Type: note [id://132287]
and a moth chases the moon...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (2)
As of 2017-03-26 03:36 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (313 votes). Check out past polls.