On 10/20/2011 06:28 PM, Rob Dixon wrote:
I think you should be wary of returning a simple scalar only when there
is just a single item in the list. You will end up having to check to
see if the return value is a reference before you know how to handle it.

I didn't design the calling interface to CGI::header() and CGI::redirect(), I'm just trying to encapsulate it.


Also, think about what the return should be if the list is empty?

For my anticipated uses with CGI.pm, the lists should not be empty:

1.  CGI::header() -type argument defaults to "text/html".

2.  CGI::redirect() -uri argument defaults to "http://localhost";.

My constructors and set() methods can enforce such.


Why are you insisting on an existing class, especially if you are
intending to extend it?

Laziness.


David

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to