Simple CPAN-like module



.
├── Changes
├── lib
│   └── MyTools.pm
├── Makefile.PL
├── MANIFEST.SKIP
├── README
└── t
    └── 01-add.t


examples/distribution/project_with_extutils_makemaker/Changes

v0.02 2021.01.17
    Test the add function.

v0.01 2021.01.16

    First version released


examples/distribution/project_with_extutils_makemaker/Makefile.PL
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',
  },
);

examples/distribution/project_with_extutils_makemaker/MANIFEST.SKIP
# Avoid version control files.
\bRCS\b
\bCVS\b
,v$
\B\.svn\b
\B\.cvsignore$

# Avoid Makemaker generated and utility files.
\bMakefile$
\bblib
\bMakeMaker-\d
\bpm_to_blib$
\bblibdirs$
^MANIFEST\.SKIP$

# Avoid VMS specific Makmaker generated files
\bDescrip.MMS$
\bDESCRIP.MMS$
\bdescrip.mms$

# Avoid Module::Build generated and utility files.
\bBuild$
\bBuild.bat$
\b_build
\bBuild.COM$
\bBUILD.COM$
\bbuild.com$

# Avoid Devel::Cover generated files
\bcover_db

# Avoid temp and backup files.
~$
\.tmp$
\.old$
\.bak$
\#$
\.#
\.rej$

# Avoid OS-specific files/dirs
#   Mac OSX metadata
\B\.DS_Store
#   Mac OSX SMB mount metadata files
\B\._
# Avoid archives of this distribution
\bMyTools-[\d\.\_]+
MYMETA.*

.git


examples/distribution/project_with_extutils_makemaker/README


A few words about the module

Maybe installation instructions.


examples/distribution/project_with_extutils_makemaker/lib/MyTools.pm
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;

examples/distribution/project_with_extutils_makemaker/t/01-add.t
use strict;
use warnings;

use Test::Simple tests => 1;

use MyTools qw(add);

ok(add(2, 3) == 5, 'adding two numbers');