Writing a CPAN Bundle
I decided to take an hour out from my big project today to make my first CPAN Bundle for the PerlCertifiedHosting Project. Last year I posted to B&BPM asking how this was done as when I looked at bundles on CPAN I couldn't see anything special. David Cantrell was good enough to respond, pointing me to:-
http://search.cpan.org/dist/CPAN/lib/CPAN.pm#Bundles
Which explains it. I was looking for some special code or something, when after all it's just a list of modules in the contents section.
First draft:-
I decided to take an hour out from my big project today to make my first CPAN Bundle for the PerlCertifiedHosting Project. Last year I posted to B&BPM asking how this was done as when I looked at bundles on CPAN I couldn't see anything special. David Cantrell was good enough to respond, pointing me to:-
http://search.cpan.org/dist/CPAN/lib/CPAN.pm#Bundles
Which explains it. I was looking for some special code or something, when after all it's just a list of modules in the contents section.
First draft:-
package Bundle::CertHost;
$VERSION = "0.01";
1;
__END__
=head1 NAME
Bundle::CertHost - A bundle to install PerlCertifiedHosting.com module requirements
=head1 SYNOPSIS
Linux:-
perl -MCPAN -e 'install Bundle::CertHost'
Windows:-
ppm install Bundle-CertHost
=head1 CONTENTS
Bundle::DBI - Start DB section
DBD::mysql
... to many to list in the blog post
=head1 DESCRIPTION
This bundle provides the CPAN module requirements for PerlCertifiedHosting.com.
=head1 AUTHOR
Lyle Hopkins E<lt>webmaster@cosmicperl.com>
=cut
The list is already very long. While wondering how to make this bundle easier to maintain I came across Bundle::Math, which is a Bundle that only lists other Bundles in it's namespace. This seems an excellent way of breaking up the modules into groups. Although I'll save this for next time.
Next steps will be making a TASK:: version and splitting up Bundle::PerlCert into groups. Also I'll need to make a script (or collection of scripts) to automate this process.
Lyle
$VERSION = "0.01";
1;
__END__
=head1 NAME
Bundle::CertHost - A bundle to install PerlCertifiedHosting.com module requirements
=head1 SYNOPSIS
Linux:-
perl -MCPAN -e 'install Bundle::CertHost'
Windows:-
ppm install Bundle-CertHost
=head1 CONTENTS
Bundle::DBI - Start DB section
DBD::mysql
... to many to list in the blog post
=head1 DESCRIPTION
This bundle provides the CPAN module requirements for PerlCertifiedHosting.com.
=head1 AUTHOR
Lyle Hopkins E<lt>webmaster@cosmicperl.com>
=cut
The list is already very long. While wondering how to make this bundle easier to maintain I came across Bundle::Math, which is a Bundle that only lists other Bundles in it's namespace. This seems an excellent way of breaking up the modules into groups. Although I'll save this for next time.
Next steps will be making a TASK:: version and splitting up Bundle::PerlCert into groups. Also I'll need to make a script (or collection of scripts) to automate this process.
Lyle
Leave a comment