what is bundle?

it is a perl module which itself does not contain any code but it contains a list of modules to be installed.

why do we need a bundle?

suppose you have written a program which uses some perl modules, then rather than installing all of them one by one , you should create a list of modules and their dependencies and keep it in the bundle,so by just installing the bundle you can get all the modules.


why do we need to keep the bundle in our private server?
since all modules are maintained by its author , he can any time upgrade it or delete it from cpan so if you keep your bundle on cpan , xyz module may not be found.
although cpan have a backup mirror from where you can get its source.

steps to create a private bundle
by private bundle I mean that every thing is kept on private server and cpan shell have only one url in its url_list
i.e. o conf urllist should only have http:www.xyz/Bundle
Now lets go into the contents of Bundle folder
modules-02packages.details.txt.gz and 03modlist.dat.gz
authors-01mailrc.txt.gz and id folder->folder named from A-Z


further id folder have folder named A-Z and these folder have futher folders named acc to authors names
eg T/TI/TIMB so TIMB is a author given a folder TIMB

M/MA/MARSAB

you can easily get 01,02,03 file. leaving it upto you.
now keep all the modules required in their respective authors folder(you can see the path of each module in 02 file)
Now create a module named Bundle::abc using the command h2xs -n Bundle::abc now go to the folder and open abc.pm file and just above "=head2 EXPORT" write "=head1 CONTENTS" and inbetween write list of required modules(including all dependencies.if you dnt want dependencies in the list then also you have to keep their source in the bundle and select "follow" option during cpan shell configuration).
now create a PAUSE account and upload your Bundle::abc
make sure that 02 file should be updated enough that it contains ur bundle and ur path.
suppose you have registered yourself as WXZY so Bundle::abc should be in authors/id/W/WX/WXYZ

copy the source of ur own module(bundle) and keep it there.
now enter cpan shell
perl -MCPAN -e shell
>install Bundle::abc
will now install all the modules in the list.
i hope this will give a little idea to the newbies like me.

thanks!!!

ansh batra
PS:please Excuse me if i have presented this in bad manner
this is my first article

In reply to how to create a CPAN bundle for your own private server by ansh batra

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.