The Musings of a Dyslexic Technologist

A blogging framework for bowtie.

Announcing App::Midgen v0.22

So what’s new?

  • Switched output format type from build to mb
  • Extract more from t/ and xt/ directories
    • Find modules in Test::Requires blocks
    • Find modules in use_ok BEGIN blocks
  • Supports suggests in on_test in cpanfile

Switched output format type from build to mb

midgen -f mb

Thanks for the kick azawawi++

Extract more from t/ and xt/ directories

We can now find the following located in your test files, then display in the revelant section in your chose output format.

Find modules in Test::Requires blocks

Example 1

Here’s a selection of Test::Requires
1
2
3
4
5
6
7
8
use Test::Requires { 'Test::Pod' => 1.46 };
use Test::Requires { 'Test::Extra' => 1.46 };
use Test::Requires qw[MIME::Types];
use Test::Requires qw(IO::Handle::Util LWP::Protocol::http10);
use Test::Requires {
  "Test::Test1" => '1.01',
  'Test::Test2' => 2.02,
  };

Find modules in use_ok BEGIN blocks

Example 2

Here’s a selection of ues_ok in BEGIN block
1
2
3
4
5
6
7
BEGIN {
  use_ok( 'Term::ReadKey', '2.30' );
  use_ok( 'Term::ReadLine', '1.10' );
  use_ok( 'Fred::BloggsOne', '1.01' );
  use_ok( "Fred::BloggsTwo", "2.02" );
  use_ok( 'Fred::BloggsThree', 3.03 );
}

Supports suggests in on_test in cpanfile

~/GitHub/Plack$ midgen -lf cpanfile

  • The above shows requires from ( use, require, no, use_ok, … )
  • The suggests come from ( Test::Requires )

nb the !mcpan are modules from the local test framework hence they don’t exist :)