Simple CPAN-like module
.
├── Changes
├── lib
│ └── MyTools.pm
├── Makefile.PL
├── MANIFEST.SKIP
├── README
└── t
└── 01-add.t
v0.02 2021.01.17
Test the add function.
v0.01 2021.01.16
First version released
use strict;
use warnings;
use ExtUtils::MakeMaker;
WriteMakefile
(
NAME => 'MyTools',
VERSION_FROM => 'lib/MyTools.pm',
LICENSE => 'perl',
PREREQ_PM => {
'Exporter' => '0',
},
TEST_REQUIRES => {
'Test::Simple' => '1.00',
},
);
{% embed include file="src/examples/distribution/project_with_extutils_makemaker/MANIFEST.SKIP)
A few words about the module
Maybe installation instructions.
package MyTools;
use strict;
use warnings;
use 5.010;
use Exporter qw(import);
our @EXPORT_OK = qw(add);
our $VERSION = '0.02';
=head1 NAME
MyTools - some tools to show packaging
=head1 SYNOPSIS
Short example
=cut
sub add {
return $_[0] + $_[1];
}
sub multiply {
return $_[0] * $_[1];
}
1;
use strict;
use warnings;
use Test::Simple tests => 1;
use MyTools qw(add);
ok(add(2, 3) == 5, 'adding two numbers');