Timothy Kohl wrote:
This is almost certainly RTFM but
what is the rationale behind
something like this.

use Blah qw(:one_piece);

for example

use CGI qw(:cgi-lib)

I realize this is for grabbing a portion of a larger .pm
file, but how does it differ from say

use LWP::Simple;

Inquiring mind(s) would like to know.

                  -T


perldoc -f use

will give you lots of info on this subject

use LWP::Simple;   # will provide access to only exported identifiers

# that is those in the @EXPORT array ....
@EXPORT = qw(get head getprint getstore mirror);

There is another magic variable involved, and that is the %EXPORT_TAGS hash. Here is a snippet from CGI.pm

(perldoc -m CGI will show you the source to the module)

%EXPORT_TAGS = (
      ':ssl' => [qw/https/],
     ':cgi-lib' => [qw/ReadParse PrintHeader HtmlTop HtmlBot SplitParam Vars/],

# so, this line will export the list of identifiers that follow :cgi-lib

use CGI qw(:cgi-lib);


Mike

_______________________________________________
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to