Re: package proposal
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: package proposal
- From: Roberto Ierusalimschy <roberto@...>
- Date: 2004年9月30日 13:44:09 -0300
> When might I have a package that has the same name as a module? And
> would it be useful to require the module alone without getting the rest
> of the package as well? I can't think of any good example, but maybe
> I'm just being unimaginative.
In Perl, for instance, you have a module called CGI and another called
CGI::Carp. You can use CGI without using CGI::Carp, the latter being a
kind of optional auxiliary module for the former.
Of course, there is nothing wrong with a main module that only imports
all sub-modules of that package, but this is just one possible design.
-- Roberto