Hi Alex,

On Wed, 8 Oct 2014 19:59:12 +0200
Alex Becker <asb.c...@gmail.com> wrote:

> Hi!
> 
> When creating the base for a new CPAN module using h2xs (e.g. with the
> command h2xs -b 5.10 -XA -n Super::Duper::Module), there is a lib folder
> created.

First of all, you should not use h2xs, but rather Dist-Zilla or Module-Starter
( https://metacpan.org/release/Module-Starter ).

> 
> In this lib folder, the name space is mirrored by a directory tree (e.g.
> lib/Super/Duper/Module.ppm).
> 
> Now, while browsing CPAN, I noticed some older modules not having a lib
> folder.

Yes, and it's a bad idea.

> 
> So, I personally like the lib folder because it's easy to identify where
> the module's code resides.
> 
> But, is there any other advantage? Or to ask in another fashion: is it
> recommended to use a lib folder and if yes, why?
> 

Using a lib folder makes everything ordered and nice, and allows you to do
perl -Mblib or sometimes perl -Ilib / etc. and is good for good measure. NEVER
Scatter your modules elsewhere.

Regards,

        Shlomi Fish


-- 
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
Beginners Site for the Vim text editor - http://vim.begin-site.org/

To have bugs is human; to find them — divine.

Please reply to list if it's a mailing list post - http://shlom.in/reply .

--
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