Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

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":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2024-06-13 21:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.