How to change the standard directory Module :: Build / Test :: More from "lib" to something else?

Using the directory and file architecture in this Publication on the Perl Unit and Code Coverage module (which was very useful), I copied the files that I will run unit tests and code coverage into the new "lib" directory, and it works like a charm!

However, I need a module to search the existing script directory.

I read the Module :: Build documentation on CPAN but I still get Can't find lib / processBuildSubs.pm file error

Here is what I still have ...

use strict;
use Module::Build;


my $newBuild = Module::Build->new(

    module_name         => 'processBuildSubs',
    license             => 'perl',
    dist_abstract       => 'processBuildSubs Unit Test',
    dist_author         => 'me@myemail.com',
    build_requires      => {
           'Test::More' => '0.10',
    },

);

$newBuild->create_build_script();

UPDATE!

Also tried this.

my $newBuild = Module::Build->new(

    module_name     => 'scripts::processBuildSubs',
    pm_files        => {'processBuildSubs.pm' => 'lib/processBuildSubs.pm'},
    license         => 'perl',
    dist_abstract       => 'processBuildSubs Unit Test',
    dist_author         => 'me@myemail.com',
    build_requires  => {
        'Test::More' => '0.10',
    },

);

Some progress, I think, seems to look in lib / scripts / .. , but still not quite what I need, but ..

UPDATE!

, ..

#!/bin/bash

mv scripts lib
perl ./Build.pl
perl ./Build testcover
mv lib scripts
firefox cover_db/coverage.html

script, , / ... - ?

+2
1

Module:: Build , "lib" ( :: Build lib, , .)

:

ln -s scripts lib

Module:: Build .

+1

Source: https://habr.com/ru/post/1533967/


All Articles