G'day szabgab,

I encountered a similar issue recently where I was adding META.yml and META.json to MANIFEST. My tests using ExtUtils::Manifest failed because those files weren't present. Like you, I realised that the files were generated by make dist, added to the tarball, then distdir was deleted: still no META.* in the development directory — either before or after make test is run.

I took a very pragmatic approach to this. make dist not only creates those files, but also adds their names to MANIFEST. So I removed my hand-crafted entries from MANIFEST and make test ran successfully. Anyone unpacking the tarball, has both the files present and the entries in MANIFEST: again, make test runs successfully.

That doesn't directly help you, as you actually want those files to be available in your development directory when you run make test.

I had a look through the test-class/t in your git repo. I couldn't see anything that looked like test_meta.t — and wasn't prepared to look through several screenfuls of *.t files — so I'll just make a general suggestion.

In test_meta.t (or whatever it's called) add a SKIP: {...} block that tests for the presence for META.*: now make test should run successfully. After make dist, unpack the tarball, which should give you a directory with the META.* files and entries for them in MANIFEST. Now run the standard incantation, perl Makefile.PL; make; make test, and hopefully tests are either successful or point to something you need to fix. When everything is good; post the tarball to CPAN.

There's potentially a more elegant solution which involves adding a sub MY::postamble {...} to Makefile.PL to generate a local_metafile (or similar) make target. That seems like a lot of work, but may be worth it depending on your requirements. My expertise with ExtUtils::MakeMaker is not at a level that I feel I can usefully provide you with any substantial help — perhaps another monk can offer advice.

A bit of bonus humour. When typing the first paragraph, my finger clipped the 'E' when aiming for the 'S': I ended up writing "My testes ...". I'm very glad I spotted that. 😌

Update: I've made multiple, extremely minor changes to last sentence of the penultimate paragraph. None of these change the intended meaning; they're just better English. As there's been no responses, at the time of writing, these do not affect anyone's reply. It'd be great if there was a "Preview" option for this. I'll post separately about that. Update: Done - see "Preview for Post Editing"

— Ken


In reply to Re: Struggle with Test::CPAN::Meta by kcott
in thread Struggle with Test::CPAN::Meta by szabgab

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.