Thanks folks! This is very instructive. (Sorry I responded that late! I posted my questions and rushed to a concert. Falstaff in a concert setting. A rather disappointment. Stupid plot even more than the usuall opera and rather dull music.) Meir
-----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Gabor Szabo Sent: יום א 14 יולי 2013 20:30 To: Perl in Israel Subject: Re: [Israel.pm] Multiple usage of 'use' for the same package On Sun, Jul 14, 2013 at 5:17 PM, Gaal Yahas <[email protected]> wrote: > On Sun, Jul 14, 2013 at 5:11 PM, Meir Guttman <[email protected]> wrote: >> >> 3) What are the pros and cons of exporting ":all" methods rather than >> just the ones in use? > > > The issue is brevity vs. namespace pollution. If you import too many > names into your own package, you risk confusion if more than one > different things happen to be imported with the same name. Also, when > you import :all, whoever reads your code needs to guess if they want > to know where the code is coming from. > I strongly advocate the use Module::Name qw(abc def); form, if you want to import the functions. That makes it easy to find the declaration of each subroutine or symbol you use in your code. In a recent blog post Ovid used the expression "grep test" http://blogs.perl.org/users/ovid/2013/07/the-grep-test---my-personal-experie nce.html Gabor _______________________________________________ Perl mailing list [email protected] http://mail.perl.org.il/mailman/listinfo/perl ----- No virus found in this message. Checked by AVG - www.avg.com Version: 2013.0.3349 / Virus Database: 3204/6490 - Release Date: 07/14/13 _______________________________________________ Perl mailing list [email protected] http://mail.perl.org.il/mailman/listinfo/perl
