Skip to content

Commit

Permalink
perlnewmod: more updates
Browse files Browse the repository at this point in the history
- hyperlink WWW::Mechanize
- direct to metacpan.org, not search.cpan.org
- changes should go in Changes, not README
- mention 'make distcheck'
- mention 'cpan-upload'
- remove paragraph about announcing to the modules list and registering
  a namespace
- hyperlink some urls
  • Loading branch information
mauke committed Jun 24, 2016
1 parent 9e5cda6 commit 12e0223
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 14 deletions.
30 changes: 16 additions & 14 deletions pod/perlnewmod.pod
Expand Up @@ -78,7 +78,7 @@ Dig into a bunch of modules to see how they're written. I'd suggest
starting with L<Text::Tabs|Text::Tabs>, since it's in the standard
library and is nice and simple, and then looking at something a little
more complex like L<File::Copy|File::Copy>. For object oriented
code, C<WWW::Mechanize> or the C<Email::*> modules provide some good
code, L<WWW::Mechanize> or the C<Email::*> modules provide some good
examples.

These should give you an overall feel for how modules are laid out and
Expand All @@ -88,7 +88,7 @@ written.

There are a lot of modules on CPAN, and it's easy to miss one that's
similar to what you're planning on contributing. Have a good plough
through the L<http://search.cpan.org> and make sure you're not the one
through L<http://metacpan.org> and make sure you're not the one
reinventing the wheel!

=item Discuss the need
Expand Down Expand Up @@ -212,13 +212,18 @@ more than just checking your module will compile.
L<Test::Simple|Test::Simple> and L<Test::More|Test::More> are good
places to start when writing a test suite.

=item Write the README
=item Write the F<README>

If you're uploading to CPAN, the automated gremlins will extract the
README file and place that in your CPAN directory. It'll also appear in
the main F<by-module> and F<by-category> directories if you make it onto
the modules list. It's a good idea to put here what the module actually
does in detail, and the user-visible changes since the last release.
does in detail.

=item Write F<Changes>

Add any user-visible changes since the last release to your F<Changes>
file.

=back

Expand All @@ -232,14 +237,15 @@ Every developer publishing modules on CPAN needs a CPAN ID. Visit
C<http://pause.perl.org/>, select "Request PAUSE Account", and wait for
your request to be approved by the PAUSE administrators.

=item C<perl Makefile.PL; make test; make dist>
=item C<perl Makefile.PL; make test; make distcheck; make dist>

Once again, C<module-starter> or C<h2xs> has done all the work for you.
They produce the standard C<Makefile.PL> you see when you download and
install modules, and this produces a Makefile with a C<dist> target.

Once you've ensured that your module passes its own tests - always a
good thing to make sure - you can C<make dist>, and the Makefile will
good thing to make sure - you can C<make distcheck> to make sure
everything looks OK, followed by C<make dist>, and the Makefile will
hopefully produce you a nice tarball of your module, ready for upload.

=item Upload the tarball
Expand All @@ -248,12 +254,8 @@ The email you got when you received your CPAN ID will tell you how to
log in to PAUSE, the Perl Authors Upload SErver. From the menus there,
you can upload your module to CPAN.

=item Announce to the modules list

Once uploaded, it'll sit unnoticed in your author directory. If you want
it connected to the rest of the CPAN, you'll need to go to "Register
Namespace" on PAUSE. Once registered, your module will appear in the
by-module and by-category listings on CPAN.
Alternatively you can use the F<cpan-upload> script, part of the
L<CPAN::Uploader> distribution on CPAN.

=item Fix bugs!

Expand All @@ -274,5 +276,5 @@ Updated by Kirrily "Skud" Robert, C<skud@cpan.org>
L<perlmod>, L<perlmodlib>, L<perlmodinstall>, L<h2xs>, L<strict>,
L<Carp>, L<Exporter>, L<perlpod>, L<Test::Simple>, L<Test::More>
L<ExtUtils::MakeMaker>, L<Module::Build>, L<Module::Starter>
http://www.cpan.org/ , Ken Williams's tutorial on building your own
module at http://mathforum.org/~ken/perl_modules.html
L<http://www.cpan.org/>, Ken Williams's tutorial on building your own
module at L<http://mathforum.org/~ken/perl_modules.html>
2 changes: 2 additions & 0 deletions t/porting/known_pod_issues.dat
Expand Up @@ -54,6 +54,7 @@ connect(2)
Coro
cpan2dist(1)
CPAN::Changes::Spec
CPAN::Uploader
cpanp(1)
CPANPLUS
crypt(3)
Expand Down Expand Up @@ -311,6 +312,7 @@ Want
wget(1)
Win32::Locale
write(2)
WWW::Mechanize
XML::LibXML
YAML
YAML::Syck
Expand Down

0 comments on commit 12e0223

Please sign in to comment.