Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Importing CGI methods into a subclass as a class method

by Phaysis (Pilgrim)
on Feb 14, 2003 at 01:30 UTC ( [id://235155] : note . print w/replies, xml ) Need Help??


in reply to Importing CGI methods into a subclass as a class method

OK. After reading your advice, and reading the most recent CGI documentation, I realized that importing any CGI methods into my Request namespace forces me into using CGI in the function-oriented fashion, and prevents me from having multiple Request objects with their own unique CGI objects. My confusion with the use CGI and $r = new CGI qw(param) importing situation has been cleared up. (Funny how re-reading, after listening to suggestions, can change things.)

I've decided my best option, at this point, is to simply make stub methods to forward calls to the CGI object. Seems to me to be the best policy. I will, however, look into your suggestions as they appear to be potentially quite usable.

Thank you folks for your quick (!!) advice. Wow.

-Shawn / (Ph) Phaysis
Among turkeys, I am the eagle. Among eagles, I am the turkey.
If idle hands are the tools of the devil, are idol tools the hands of god?

Replies are listed 'Best First'.
Re: Re: Importing CGI methods into a subclass as a class method
by ihb (Deacon) on Feb 14, 2003 at 01:48 UTC
    I realized that importing any CGI methods into my Request namespace forces me into using CGI in the function-oriented fashion

    Actually... no. :) The CGI subroutines are a dual in how they act. If they're used as functions, they act like functions. If they're used like methods, they act like methods. So you can still import CGI methods/functions and expect it to work.

    ihb