I get
$ dh-make-perl --build --cpan String-Random-0.22 Dispatching deprecated method 'CPAN::Config::load' to CPAN::HandleConf +ig CPAN: File::HomeDir loaded ok (v0.69) CPAN: Storable loaded ok (v2.18) Going to read /home/bri/.cpan/Metadata Database was generated on Sun, 03 Aug 2008 02:03:08 GMT Can't find 'String::Random::0.22' module on CPAN
dh-make-perl --build --cpan ... expects a package name ie dh-make-perl --build --cpan String::Random

I've built hundreds of packages using dh-make perl. Here's how I do it...

  1. cd ~/.cpanplus/5.10.0/build/
  2. cpanp t MooseX::Getopt # I let CPANPLUS handle the dependencies
  3. dh-make-perl --build MooseX-Getopt-0.15
  4. This leaves the built deb, libmoosex-getopt-perl_0.15-1_all.deb in my cpanplus build directory. You could use this file, but I continue
  5. rm libmoosex-getopt-perl_0.15-1_all.deb
  6. cd MooseX-Getopt-0.15/
  7. emacs debian/changelog # change first line from (0.15-1) to (0.15-0) so that any official package will overwrite mine
  8. dpkg-buildpackage -us -uc # rebuild the package
  9. cd ..
  10. sudo dpkg -i libmoosex-getopt-perl_0.15-0_all.deb

There's probably an option to dh-make-perl to set the debian version number that would make steps 5-9 unnecessary, but it's so little effort I haven't looked.

I actually followed these steps as I've typed them up, so why not follow along and report back which bit doesn't work for you?

Update:

There is indeed an option to set the package's version number, but you have to include the upstream version number too: dh-make-perl --version 0.15-0.0 --build MooseX-Getopt-0.15


In reply to Re: Issues installing CPAN modules on Debian (OT) by FunkyMonk
in thread Issues installing CPAN modules on Debian (OT) by bradcathey

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.