in reply to Task:: or Bundle::

Module installation by hand doesn't take care of the dependencies. If you install the Task module with CPAN or CPANPLUS, they'll take care of it, just like for any other module.

Installing bundles is a separate process and more confusing, so Task makes it look like a normal module installation. I certainly think it's the way to go, especially with things such as CPAN::Mini and CPAN::Mini::Inject which you use to get your local, private modules into the process.

Update Sure, CPAN.pm makes it look like a Bundle is doing it the same things as a normal module installation, but it's a lot different behind the scenes. To use folks who write the code to handle those things, treating a group of modules just like any other module is much easier than programming a special case. You might care because maintaining that special case distracts from other work. You can do what you like though, I guess, and we'll keep making it work for you. :)

--
brian d foy <brian@stonehenge.com>
Subscribe to The Perl Review

Replies are listed 'Best First'.
Re^2: Task:: or Bundle::
by Corion (Patriarch) on Mar 13, 2007 at 18:28 UTC

    Now, when using cpan, where does a bundle differ from any other package?

    cpan Bundle::CPAN

    installs just the same as any other module.

    I'm aware that the handling of a bundle is completely different from the handle of other packages by the internals of CPAN and (I guess) CPANPLUS, but as they conveniently shield me from the differences, why should I care?

      Well, for example, Bundle::CPAN ignores the Makefile.PL.

      Instead, it reads the .pm file to look for specially formateed POD entries instead!

      This means there's no capability to do platform-senstive Bundle:: modules. In fact, there's no capability to do ANY sort of interesting things.

      You write it in the POD, hope you don't accidentally write something in the POD that the CPAN client will mistake for a module, and than pack it up with a Makefile.PL that does nothing.

      Oh, and because Bundle:: modules are never installed, you can never tell whether a Bundle:: module has been installed of not.

      They are completely invisible.

      This can lead to some scenarios where you want a specific tarball version installed (not just a class) and because the Bundle:: doesn't know if it is installed, it just reinstalls the same package all over again.

      If two modules both use the same Bundle:: in your recursion tree, well then it will install it TWICE!

      Oh, and don't expect to be able to use them if you write your own CPAN client or installer, because you yourself have to implement the weirdness inside of them.

      And you can't install a Bundle module by hand with Makefile.PL... well you can, except it will lie to you, because only what's in the POD matters, not what's in the Makefile.PL, so you have to maintain the dep list twice.

        This is all from a Bundle author perspective, and I understand that part. But where do I start caring, as a user? All I have to do is type cpan Bundle::Foo or cpan Task::Foo and there is no difference to me as a user.