A piggy bank of commands, fixes, succinct reviews, some mini articles and technical opinions from a (mostly) Perl developer.

Jump to

Quick reference

How to build a CPAN module

Not really, this is just a few rough notes.

https://metacpan.org/pod/Dist::Zilla::Tutorial - shows the format of dist.ini

http://dzil.org/tutorial/start.html

Still use a cpanfile, and also Dist::Zilla::Plugin::Prereqs::FromCPANfile

on configure => sub {
requires 'perl' => '5.006';
requires 'warnings';
requires 'Module::Build::Tiny' => '0.034';
};
on develop => sub {
requires 'CPAN::Common::Index::Mirror';
requires 'Test::CPANfile';
};
on runtime => sub {
requires 'warnings';
requires 'DBIx::Class';
requires 'SQL::Abstract';
};
on test => sub {
requires 'Test::DBIx::Class';
requires 'Test2::Suite';
};
view raw cpanfile hosted with ❤ by GitHub
With dzil you can choose whether you want to generate a Makefile.PL or Build.PL

Changes:
Revision history for {{$dist->name}}
{{$NEXT}}
- did something
view raw Changes hosted with ❤ by GitHub

Thanks to Nelo & the team.

Test that all your module dependencies are listed in the cpanfile

Put this at xt/author/cpanfile.t:
use Test::Most;
use Test::CPANfile;
use CPAN::Common::Index::Mirror;
cpanfile_has_all_used_modules(
parser => [':installed'],
index => CPAN::Common::Index::Mirror->new,
develop => 1,
perl_minimum_version => 1,
);
done_testing;
view raw cpanfile.t hosted with ❤ by GitHub
Thanks Anton & the team.

When Postgres allows any password

Problem: Postgres does not check my password, i.e. it accepts all passwords.

Solution: pg_hba.conf and change trust to md5. Restart postgres. That is all.

(source)