in reply to Questions about sharing code

I'm gonna agree with perrin (typical!) and disagree, partially, with dragonchild (WTF OMG).

For straight function code I've taken to doing things like-

use HTML::Entities (); ... HTML::Entities::encode_entities($whatever);

Because I can't stand reading code later that is hard to follow or potentially sends you to the wrong package with much confusion. With cutting+pasting and knowing your IDE, fully qualifying stuff is easy to type and much easier to follow later.

For OO, the name space is carried in the object so, no problems.

Also, I find using CGI.pm's OO interface goofy. The main non-aesthetic difference is that your code will run slower as OO. Otherwise, CGI::param() is no different from $cgi->param(). It's great to have CGI.pm's objects when you need to sling objects around (like in TT2 or something), but many, most I've written, CGIs are standalone in a way that makes imperative code easier to read and much easier to type.

use CGI; my $cgi= CGI->new(); print $cgi->header(); # etc...